I am trying to use negative look-ahead as per this reply to match numbers not containing the digit 5:
echo "aaa 123467890 3456 bbb" | egrep '[(?!5)[:digit:]]+'
The color output shows that the second number is matched. How do I fix this?
Is there a way with egrep
to exclude 5
from the class [:digit:]
? (I performed a number of searches, but could not find anything to this end)