in reply to Re: RegEx ignoring intervening characters?
in thread RegEx ignoring intervening characters?
If I understand your code right, that'd delete anything matching [^A-Z] first, and then match the pattern second, right?
I guess I should have explained better, but I don't want to modify anything interspersed within the matching ABCD characters. In fact, I very emphatically want them to remain unmolested. So, while your approach looks like it would work, it's not quite what I was looking for.
As for $s =~ /A[^A-Z]*B[^A-Z]*C[^A-Z]*D/;
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?
Thanks
Matt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: RegEx ignoring intervening characters?
by imp (Priest) on Jan 19, 2007 at 21:12 UTC | |
|
Re^3: RegEx ignoring intervening characters?
by webfiend (Vicar) on Jan 19, 2007 at 21:59 UTC |