K
kj
I want to remove from a (variable) string any character whose ascii
code is greater than 127, along with any whitespace preceding it.
The only regexp I can think of to do this with is the abominable:
/\s*(.)/ord($1) > 127 ? '' : $1/eg
Is there a better way?
Thanks!
kj
code is greater than 127, along with any whitespace preceding it.
The only regexp I can think of to do this with is the abominable:
/\s*(.)/ord($1) > 127 ? '' : $1/eg
Is there a better way?
Thanks!
kj