Say it's very easy if I want to find something containing lower-case letters and numbers with
produce_text | grep -E '[0-9a-z]'
Brackets are useful to match a set of characters, but what about those that are somewhat special?
If I want to, using brackets, match any character but one of these: a closing bracket ]
, a dash (or hyphen) "-", both slashes /
and \
, a caret ^
, a colon :
.
Will it look like this (I know this doesn't work)?
[^]-/\^:]