Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
what I am having trouble with is combining all those options in a single regexp. should I just write 3 separate tests to match the possible input? NOTE: the format above is exactly as I want it to match with the semicolon left out of the variable $1. What I have tried:command: cmd; command: cmd arg1; command: cmd arg1 arg2; command: cmd arg1 arg2 arg3;
/^command: ([a-z]+ (?:[^ ]+ ){0,3});/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: single regexp to match a defined STDIN
by chromatic (Archbishop) on Sep 25, 2001 at 00:38 UTC |