This worked for me. Don't forget the 'greedy' regex: s/^.*?(abc)//;
-----Original Message----- From: Tham, Philip [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 10, 2005 3:59 PM To: beginners@perl.org 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. Philip -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>