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

No extraction of data this time, just a little check on $record, print substr( $record, 0, 20) =~ /^\d+ *$/ ? 'OK' : 'NOK'; I like to keep the regexen as simple as possible.

After Compline,
Zaxo

  • Comment on (YAWTDI) Regex to match 20 chars of some digits followed by some spaces
  • Download Code