0

I have string (mystring) as below containing double quote:

String mystring = "my regex expression checked=\"someword_and_moreword_value\"";

expected output:

mystring = "my regex expression";

tried with following, did not get expected output:

mystring = mystring.replaceAll("[checked=\\w*_value]", "");
Nish
  • 127
  • 1
  • 10

1 Answers1

1
checked=.*?_value\\"

Try this.Remember [] is a character class .See demo.

https://regex101.com/r/vD5iH9/27

vks
  • 63,206
  • 9
  • 78
  • 110