How to replace non-breaking space character (not nbsp entity)
Assuming I have a sting which is "a s d d" and htmlentities turns it into "a s d d". How to replace (using preg_replace) it without encoding it to entities? I tried preg_replace('/[\xa0]/', '', $string);, but it didn't remove the characters. What are the possibilities beyond regular expression? My question is not exactly "how" to do this (since I could encode entities, remove entities I don't need and decode entities). But how to remove those with just str_replace or preg_replace.
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.