I\'m stumped! Trying to write an awk regex to match a string against 11 digits.
I\'ve tried:
if (var ~ /^[0-9]{11}$/ ) if (var ~ /^([0-9]){11}$/ ) if (va
If you are trying to match exactly 11 consecutive digits someplace in the string:
Using the test file:
hi12345678910 hi1234
The windows version of awk command line:
awk --posix "{ if ($1 ~ /[0-9]{11}/) print}" testfile.txt
It printed:
hi12345678910