Paresh Thummar
Paresh Thummar

Reputation: 928

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...) ?

Upvotes: 4

Views: 8827

Answers (1)

Chintan
Chintan

Reputation: 1204

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])/

Upvotes: 4

Related Questions