I have a following content
ONE
1234234534564 123
34erewrwer323 123
123fsgrt43232 123
TWO
42433412133fr 234
fafafd3234132 342
THREE
sfafdfe345233 3234
FOUR
324ereffdf343 4323
fvdafasf34nhj 4323
fsfnhjdgh342g 4323
Consider ONE,TWO,THREE and FOUR
are separate group.In that I want match only ONE
and FOUR
, based on the condition of second value of each line in the every group must be same and it will match group that has more than one line in that..How can I do that in regular expression
I have already tried following regex, but its not up to the mark
\w+\n\w+\t(\d+)(\n\w+\t\1){2,}