Grep

From Andreida
Revision as of 16:11, 20 March 2021 by Andreas (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

It depends on your linux/grep, how you have to build your regular expressions.

Search for letter/digit combinations of a certain length

grep -oe  '[[:alnum:]]\{17\}' my_data.txt

E-Mail addresses

grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" rejectlog* | sort -u