in reply to Perl regular expression rules
Second best, perhaps? Seek out a regex explanation utility of the sort frequently mentioned here.
Next best, try it. Test (brute force) a substantial subset or all the commands you're likely to use, in a dry run setting like:
#pseudocode my @commands=qw(ls rm rd cat....); for $command(@commands) { if ($command =~ /(your regex here)/ ) { say "regex matched $command"; } else { say "Oops! $command slipped by"; } }
|
|---|