RE: [Perl-unix-users] requesting regular expresion help

2005-02-23 Thread Dave Blakemore
Thanks everyone.    I got 3 suggestions, 2 almost worked, and one (Bruce) worked right out of the box...       # Matt  if (m/^\s*(\w+)\s*=\s*(.+?)\s*$/) {    almost:  however it matched the condition of "nothing but white space after the ="    which I wanted to eliminate.    # C

RE: [Perl-unix-users] requesting regular expresion help

2005-02-23 Thread Chad I. Uretsky
Title: Message I haven't tested this, but how about:   m/^\x*(\w+)\s*=\s*(\".+\*|\w+)\s*$/   Then $2 should contain the match (if any) from (\".+\*|\w+), which should be either a quoted string or a single word. Chad Uretsky Lead Network and Security Engineer NetIQ Corporation [EMAIL PROTECT