Michael,

This might be safer:

$line=~/^([^-]*?)-/;

$everything_to_first_hyphen=$1;


Paul


I'm sure this is obvious, but I'm missing it - What's the regular
expression to extract everything from the start of the line to the
first hyphen?


Thanks!

Mike-

--
If you can keep your head while those around you are losing theirs...
You may have a great career as a network administrator ahead!
--
Please note - Due to the intense volume of spam, we have installed
site-wide spam filters at catherders.com.  If email from you bounces,
try non-HTML, non-encoded, non-attachments,
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


--
Sincerely,

Paul Appleby

(416) 530-0070
http://www.paulappleby.com
http://myspider.ca
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to