Is there a simple way to pattern match for only those characters found on a standard US keyboard? Or must i type out each specific key (aside from the \w\s ones obviously).
I tried to use \p{IsASCII} but got back a very weird error message. Which, at this time i can not put into this post.
If i have to type out the characters individually, which ones must be escaped if placed into a set ie: []
Would that be the correct way to pattern match for standard keys or is there a simpler way. Also, am i escaping the correct characters or too many? (And yes, what I am really trying to do is find something that is not on a standard US keyboard.)
B
I tried to use \p{IsASCII} but got back a very weird error message. Which, at this time i can not put into this post.
If i have to type out the characters individually, which ones must be escaped if placed into a set ie: []
Code:
if ($_ =~ /[^\s\w`~!@#\%^&\*\(\)-+=\{\}\[\]\|\\;:'"\?\/><.,]+/)
{
Do something
}
Would that be the correct way to pattern match for standard keys or is there a simpler way. Also, am i escaping the correct characters or too many? (And yes, what I am really trying to do is find something that is not on a standard US keyboard.)
B