Reputation: 2056
I have this string output:
"Appliances Air Conditioners
Appliances Split AC"
I am trying to use regex to remove the second occurrence of "Appliances" word:
(Appliances.\*?(Appliances))*
But getting no success.
Upvotes: 0
Views: 70
Reputation: 785156
You can search for:
\b(Appliances\b[\s\S]*?)\bAppliances\s+
And replace by \1
You need to use DOTALL
or [\s\S]
to match a newline.
Upvotes: 3