The regular expression parser goes to each character in the string and checks it with a regular expression.
The first part, (?=...) , is called "lookahead", and asks if the next character has everything that is specified (ie [\x00-\x7F] ). It does not move the pointer to a character.
The next part says that the next character is not alphanumeric, but moves the pointer to the character.
And so it does what you told him; i.e. match any non-alphanumeric ASCII character.
It does not match £ in £ ££££A$££0#$% £ ££££A$££0#$% , because £ not ASCII. If you want to match ANY character that is not alphanumeric, you are probably looking for this regular expression:
`[^a-zA-Z0-9]`
For more details see http://www.regular-expressions.info/lookaround.html and other pages on the site.
oink
source share