To: 'Tham, Philip'
Subject: RE: Help with substitution

Subject: Help with substitution

Hi 

I have a string which reoccuring patterns

1abc2abc3abc4abc567

How do I remove everything before the 1st occrence of abc to get the
result
2abc3abc4abc567

s/^.*abc//

Gives me 
567

Thanks in advance.

perl -e '$a="1abc2abc3abc4abc567"; $a=~ s/^.*?abc(.+)$/$1/; print "$a\n";'

Thanks Wags - If I recall correctly...

jwm

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to