• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Regexp help

The spaces comeout as 0xa0 if the come from a 'real' space and 0x20 if the come from a  

I put the XML through JTidy to get the DOM.

Never even know there were 2 types of space and the debugger clearly never knew the difference.

Recon i'm jusy going to replace all the 0x20 to 0xa0s

Cheers.

Yup, 0xa0 (aka 160) is the non-breaking space. Therefore,

Code:
[\s\xa0]-[\s\xa0]

should do what you want :)
 
That is how you lose 2 hours doing the most trivial of things that should be easy.

Cheers.
 

Advertisers

Back
Top