Skip to content Skip to sidebar Skip to footer

How To Remove \u0000 From String?

I am encoding PDU message. At beggining of message I got String Some thing like : \u0005\u0000\f0)@\u0000This is testing\u0000 How to remove it(\u0005...) ? Thanks

Solution 1:

Try this Regular Expression to remove unicode char from the string :

 /*\\u([0-9]|[a-fA-F])([0-9]|[a-fA-F])([0-9]|[a-fA-F])([0-9]|[a-fA-F])/

Post a Comment for "How To Remove \u0000 From String?"