dan wrote:
> Hey again.
> 
> I have another problem, I have a string of nicknames that looks like:
> 
> $mystring1 = "nick1,nick2,nick3,nick4,nick5";
> 
> I've asked this question before, but because of my bad regex
> knowledge, I'm asking again, but this time in a slightly different
> context. The last time I asked, the string was:
> 
> $mystring2 = "nick1 nick2 nick3 nick4 nick5";
> 
> and I was given this regex: (assume $src contains "nick3")
> 
> $mystring2 =~ s/(\s|^)\Q$src\E(?=\s|$)//g;
> 
> I was told that this would remove the trailing space after $src, but
> since now there is no trailing space, just a comma instead. What's
> the alteration I need to make to this to remove $src from $mystring1?
> 
> Thanks in advance.
> 
> Dan

        Replace the \s with a , and it will work for you.

Wags ;)


**********************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
****************************************************************


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to