Possible Duplicate:
regex replace all ignore case
How do I get the required output?
input string –
"Software Industry. software Industry. SOFTWARE INDUSTRY. software industry. "
word to be searched –
"software industry"
Output –
"*Software Industry*. *software Industry*. *SOFTWARE INDUSTRY*. *software industry*. "
In short I have to find a phrase and replace the same phrase with starting and ending asterisk (*), IGNORING THE CASE ..
You can use
replaceAllwith(?i)which will docase-insensitivereplace.