in reply to Regex to match command line arguments
What would be a pattern that matches:Something like this should do the trick
See. perlre for more info.my $re = qr/\s -D?jetty\.home= (.+?) (?:\s|$) /x; /$re/ and print "yup - $1" for q[-Dname1=2 -Dname2.3="anything" -jetty.home="c:\a\b\c"], q[-Dname1=2 -Dname2.3="anything" -Djetty.home=c:\a\b\c] __output__ yup - "c:\a\b\c" yup - c:\a\b\c
_________
broquaint
|
|---|