On Fri, Jul 27, 2012 at 10:22 AM, Dr.Ruud <[email protected]> wrote: > On 2012-07-27 16:58, Andy Bach wrote: > >> if ($model=~/(\S+)\s+(.*)\s*$/) { > > > The \s* in the end does nothing.
Well, I was thinking if it's a multi-word second match: v6 Austin Martin<space><space> Then that would matches the rest of the phrase and trims trailing blanks. > Closer: > /(\S+)\s+(.*\S)/ Yeah, that's better - using the non-whitespace as anchors, so to speak! -- a Andy Bach, [email protected] 608 658-1890 cell 608 261-5738 wk -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
