Reputation:
I want to in below sample text using regex find:
I have tried searching for:
Loves*."$
And replace with /1 Very Much
but no luck, pointers are appreciated.
I am using Notepad++ for this.
"Sample Text"
--------------------
DOLLY Loves DOLLS" Like Elephant"
DOLLY;
DOLLY Loves DOLLS Like Dog"
DOLLY Loves DOLLS Like Cat" But Bats Not
DOLLY "Loves" Her Lover Matt"
Mr. O' Neil" King Hates Dolls
DOLLY Loves DOLLS Like Bat"
DOLLY;
Upvotes: 1
Views: 755
Reputation: 70732
You can use the following regular expression in Notepad++.
Find: \b(Loves.*")$
Replace: \1 Very Much
Note: Make sure "Regular expression" is checked and .
matches newline is unchecked.
Upvotes: 1
Reputation: 44833
This is untested but should work. Make sure case-insensitive matching is on. Search:
(Loves.*")$
Replace
$1 Very Much
Also, make sure you're doing a global replace (Replace All). Otherwise, it will only match the first instance after the cursor. See this Regex101 demo
Upvotes: 0