Jerry Preston wrote: > > Hi! Hello,
> I do not understand why my regex works , then does not. > > regex: > my (@dat) = /(\w+\s+\w+\s+)=\s+(\w+)_(\w+)_(\w+)_/; > Works! > > Process Name = D4_jerry_5LM_1.91_BF > Returns: > Process Name DM4 15C035 5LM > > Does NOT work: > Process Name = d4_jerry_5lm > > Is there a better way to write this regex? $ perl -le' $_ = q/Process Name = D4_jerry_5LM_1.91_BF/; @dat = split /\s*[=_]\s*/; print for @dat; $_ = q/Process Name = d4_jerry_5lm/; @dat = split /\s*[=_]\s*/; print for @dat; ' Process Name D4 jerry 5LM 1.91 BF Process Name d4 jerry 5lm John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]