Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^3: RegEx ignoring intervening characters?

by imp (Priest)
on Jan 19, 2007 at 21:12 UTC ( #595596=note: print w/ replies, xml ) Need Help??

in reply to Re^2: RegEx ignoring intervening characters?
in thread RegEx ignoring intervening characters?

if the $x pattern I am looking for is from uc(chomp($x = <STDIN>)), would I just need to use split, inserting the ^A-Z* after every character? would that work?
Yes, you would do this:
my $x = <STDIN>; chomp $x; $x = uc($x); my $regex = join('[^A-Z]*', split //, $x);

Comment on Re^3: RegEx ignoring intervening characters?
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2015-11-27 22:50 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (734 votes), past polls