Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to replace all match string in android

How to convert following javascript regex replace to andrjoid?

output =  output.replaceAll(/\u106A/g, " \u1009");
like image 696
PPShein Avatar asked Jul 12 '26 20:07

PPShein


1 Answers

You can use:

output = output.replaceAll("\\u106A", "\\u1009");

Or this:

output = output.replace( "(\\u1031)?(\\u103C)?([\\u1000-\\u1021])\\u1064", 
       "\\u1064$1$2$3");

btw Javascript doesn't have any replaceAll method. You probably meant String#replace in JS.

like image 151
anubhava Avatar answered Jul 14 '26 08:07

anubhava



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!