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
You described your problem, but didn't tell us your awk version. It is an important information.
but this may work for your case:
if (var ~ /^[0-9]+$/ && length(var)==11)
If we know the version, there could be simpler solution.