I am splitting a string using the following code in my Android app. But it’s getting crashed. It is saying like PatternSyntaxException.
String quotes_string = "1.agshjdgasfghsfjhsdfhjsfhjgj.#**#2.dfjngdhfkgjkfglkhjkh.#**#3.fdghjkhdgkklf";
String[] apps = QuotesActivity.quotes_string.split("#**#");
String quote = apps[0];
txt_quotes.setText(quote);
I think you need to escape the ‘*’ character. Change the regex to “#\\*\\*#”.