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});/
In reply to single regexp to match a defined STDIN by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |