Re: about a regex
Adam Hopkins <[email protected]>
| Newsgroups | gmane.comp.lang.perl.beginners |
|---|---|
| Message-ID | <CAEJht3cg3ypjM=sDrU3+O+yVxpbYTQpsMJyF6Y3Vkq6-p-GntQ@mail.gmail.com> |
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 <[email protected]> wrote: > Hello > > I know [a-zA-Z0-9] means words and numbers. > But what's the reverse of this regex? > > Thank you. >