If you add an underscore (the equivalent of \w): [a-zA-Z0-9*_*] Then \W is the opposite.
If you wanted to not match [a-zA-Z0-9] You could do $string !~ m/[a-zA-Z0-9]/ On Fri, Dec 31, 2021 at 10:23 PM Piper H <pott...@gmail.com> wrote: > Hello > > I know [a-zA-Z0-9] means words and numbers. > But what's the reverse of this regex? > > Thank you. >