in reply to Regex to match 20 chars of some digits followed by some spaces

perl -nle 'print "match" if /^\d(?:\d| (?![^ ])){19}$/'

Matches 1 digit followed by 19 digits or spaces-not-followed-by-a-non-space.

-sauoq
"My two cents aren't worth a dime.";
  • Comment on Re: Regex to match 20 chars of some digits followed by some spaces
  • Download Code