I am using Eclipse and Notepad ++ to perform replacement multiple files (xml & java)
I am trying to replace [Pp]roduct[Mm]ember with [Ff]und[Mm]ember in one single replacement and preserving the case.
ProductMember -> FundMember
productMember -> fundMember
productmember -> fundmember
Using capturing groups it is easy to keep the case of the M from Member, but I am clueless for the P replacement.
Thanks for the help!
replace method is case sensitive.
To replace text in Notepad++, follow the steps below. Open the text file in Notepad++. In the top menu bar, click Search and select Replace. In the Replace window, on the Replace tab, enter the text you want to find and the text you want to use as a replacement.
In eclipse you can use the regex retain-case operator: \C. To solve your example you should search for "Product", replace with "\CFund" (be sure to tick the Regular expression option). This will replace Product with Fund and product with fund.
Update:
Make sure not to have the Case Sensitive box checked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With