I want to match the duplicated words which in this instance is GHL_AutoMatchFaulted In this example, there are 5 occurrences which I want to match all 5 otherwise it will not match
GHL_AutoMatchFaulted
GHL_AutoMatchFaulted
GHL_AutoMatchFaulted
GHL_AutoMatchFaulted
GHL_AutoMatchFaulted
Is this possible?
Any help would be much appreciated. Thanks.
Tried almost all from the forum but nothing works.
CodePudding user response:
How about this one: ?
(GHL_AutoMatchFaulted\s?\n?){5}
- Looks for the keyword
GHL_AutoMatchFaulted
- with an optional space
\s?
- and an optional carriage return
\n?
- for exactly 5 times
{5}