clarkk clarkk - 1 year ago 57
PHP Question

regepx - odd whitespaces in string

I'm doing some regexp on some strings and in my pattern I match for whitespaces


But in some strings I experience some strange spaces.. When converted to hex

How to convert all strange spaces to a normal space so it can be detected with regexp and both

When the string is presented as UTF8 all
chars are represented as a

input in HEX


input as string

 55 82 84 15 - DK 12 68 36 93

hsz hsz
Answer Source

a0 is a representation of   - non-breaking space.

You can match it with:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download