On Dec 3, 2003, at 7:06 AM, Rob Dixon wrote: [..]
remember that those double quotes will allow things to be 'interpolated' - which is not what you want.
No they won't: they're not string delimiters in this context so they'll be treated as any other non-special character between the real s/// slash delimiters.
Rob
Minor Blonde Hair Moment On my phrasing. Thanks You for the good catch!
let's look at some code:
my $foo = q|" _</pat stuff _</pat> other stuff|; print "$foo \n"; $foo =~ s|" _</pat|"</pat"|g; print "$foo \n";
which will generate
" _</pat stuff _</pat> other stuff "</pat" stuff _</pat> other stuff
Now IF the OP really wanted that sort of case, then while a bit wacko, it will work.
So the question is whether that '"' double quote token is a part of the pattern that will be searched for, or is it the sort of classic cut and paste problem of say
my $foo = " _</pat .... _</pat";
and in the heat of trying to sort out what was scragged in the RegEx, hoping over the line to
$_ =~ s/"_\</pat"/"\</pat"/gi; #g for every occurrence, i for
hoping that by adding in more tokens it would make it go zoom zoom..
I think that were you or I working the RE and we wanted to remove ' _<' and replace it with mere '<' we would have done say
$_ =~ s| _<|<|g;
Or we might use say
$_ =~ s|\s*_<|<|g;
to clean out the preceeding 'white space'...
ciao drieux
---
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]