RE: RegEx Prob WAS: Problem with reading string

2001-05-01 Thread J. Patrick Lanigan
I just keep learning. This list is making learning much easier. Thanks to Dan and Jason, Patrick > you need the global modifier .. what you're trying to do is do the current > match globally throughout the whole string (not zero or more) > > $mystring =~ s/\'/\\'/g;

RE: RegEx Prob WAS: Problem with reading string

2001-05-01 Thread King, Jason
J. Patrick Lanigan writes .. >> I was using: >> >> $mystring =~ s/\'/\\'/; >> >> ...to replace ' with \' in $mystring. It was working find I >> thought, until I >> encountered a string with multiple apostrophies. How do I replace >> 0 or more? >> >> Ex: >> >> "No More 'I Love You's'" >

RegEx Prob WAS: Problem with reading string

2001-05-01 Thread J. Patrick Lanigan
Opps, I forgot to change the subject. I think I need to get outside and get some fresh air. > I was using: > > $mystring =~ s/\'/\\'/; > > ...to replace ' with \' in $mystring. It was working find I > thought, until I > encountered a string with multiple apostrophies. How do I replace > 0 or