Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: regexp and substitute operator problem

by dannoura (Pilgrim)
on Jul 08, 2003 at 06:28 UTC ( [id://272208]=note: print w/replies, xml ) Need Help??


in reply to Re: regexp and substitute operator problem
in thread regexp and substitute operator problem

Yep, you're right, that was a pretty stupid mistake. Thanks for your help. This:

@chroms = grep {  /[pqxy]/i } @chroms;

solves it.

Replies are listed 'Best First'.
Re: Re: Re: regexp and substitute operator problem
by Dog and Pony (Priest) on Jul 08, 2003 at 06:37 UTC
    As for your second question, just copy/pasting your code and the example text does output the hyphens and dots here. What are you displaying it on?

    Also, you might at least want to put some () around the central part of your regex, as in: /\s($c*?)\s/ so you won't capture the whitespace around the matches as you do now. Or maybe that is what you wanted.


    You have moved into a dark place.
    It is pitch black. You are likely to be eaten by a grue.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://272208]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-18 04:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found