Can anyone help me with creating a regex for variables in java so that the string variable will be considered to be a case insensitive and replace each and every word like Access, access, etc with WINDOWS of any thing like that?
This is the code:
$html=html.replaceAll(label, "WINDOWS");
Notice that label is a string variable.
Just add the “case insensitive” switch to the regex:
Note: If the label could contain characters with special regex significance, eg if label was
".*", but you want the label treated as plain text (ie not a regex), add regex quotes around the label, eitheror