Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
If what you want to allow is all printable ASCII characters, you can use regex character classes to specify that a string containing any non-ASCII characters or control characters is "funny":
This is equivalent to checking that no character has an integer value less than or equal to 31 (1f hex), or greater than or equal to 127 (7f hex):
See perlre(1) for more details. Both of these solutions disallow newlines and tabs; you can allow them with the [:isspace:] character class. In reply to Re: Regex for weird characters
by sgifford
|
|