This regex is better than mine, because * is greedy and will gobble everything till the last "-" matched, not the first one. I momentarily forgot about that. :) This will handle that situation where there is multiple "-" characters within the string, but you only want to delete everything up until the first occurrence of "-".


pDale Campbell wrote:

Chris Cappelletti wrote:

I don't write regular expressions...ever...


Then you're probably using the wrong language.


So can someone give me a regular expression that will remove all of the
characters at the start of a string up to and including a "-" (without
quotes).


$title =~ s/^[^-]*-//;


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to