What is the regular expression for REVERSE of five consecutive nubmers

Hi , we all know that the regex for five consecutive number is [0-9][0-9][0-9][0-9][0-9]

But what is the regex for "anything but five consecutive numbers"

I want to use an awk script to replace anything but five consecutive numbers with blank, so that 3423ljljaj43222jkjlj2fasd becomes 43222

you can use grep for that.

grep -Ev '[0-9]{5}' file

or

echo $var | grep -Ev '[0-9]{5}'

for awk, you can negate the condition.

$0 !~ /regex/

try this

awk -F[a-z]+ '{print $2}' file