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;
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'"
>
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