Good Evening,
I am attempting to utilize multiple character classes at the same time without success. Given a column that contains the URI of HTTP traffic, I want the REGEX to identify lines that where the URI field contains a string of text 6-10 characters long that contains numbers AND lower case letters...at least one of each, but NOT upper case letters.
This search will NOT be bounded to a specific character or part of the string...
Test strings:
aasd4567
9f7g6s5df
0hjksdf73
123456789
12345/1234a
Wordswords
W0rdsW4rds
aasd4/567af
9f7g6s5dfasdf
0hjks/asdf
12345/1234asd
Wordswords12
W0rdsW4rds12312312
I had hoped I could utilize a little boolean with brackets, ie:
awk --re-interval '$1 ~ /([0-9]+&[a-z]+){6,10}/'
But that doesn't work. And obviously, combining them won't work either because
awk --re-interval '$1 ~ /[a-z0-9]{6,10}/'
still returns strings without any numbers and without any lowercase letters.
I even tried to find ways to combine [[:lower:]] and [[:digit:]] but faced the same issue as the first example above.
I'm sure it's a super easy fix, what am I missing? I'm not against using gawk/grep/sed/etc, whatever is the most efficient tool for this task.
Thanks