in reply to Re^2: character encoding ambiguities when performing regexps with html entities
in thread character encoding ambiguities when performing regexps with html entities

is there a regular expression I can write that detects non-ascii characters?

Here are a couple easy ones:

/[^\x00-\x7f]/ /[^[:ascii:]]/
They both work whether or not the string happens to have its "utf8 flag" turned on.
  • Comment on Re^3: character encoding ambiguities when performing regexps with html entities
  • Download Code