Including test for whitespace in addition to other tests as per perl template
I want to find a given string for symbolic or weird symbolic characters that occur when exporting / importing between MySQL and Excel when using a tab delimited text file.
To do this, I tried !~ /[a-zA-Z0-9]\s/
- I thought that this pattern will test the given string and identify those that contain anything other than a-z
, a-z
, 0-9
or space?
Pasting this into the inline regex tester \s
works on its own, but when I add an element a-zA-Z0-9
it cancels the white space.
White space can be anything in the string, or it can be at the beginning or end, what is the correct regex to capture it?
source to share