Hello,
I have a file that looks like this:
WU AND+EIA exalted (exalted+Slipstream) / enchantments (Curses+enchantments) / artifact (artifact+artifact) / graveyard (Disturb+Pressure) / control (control+control)
UB DHM+HLW control (control+control)
BR EIA+RAK crats (crats+crats)
RG HLW+AND stompy (buddy/Journey+4+ damage) / tempo (Journey+Keys)
GW RAK+DHM go-wide (go-wide+go-wide)
WB LDO+SOU plus counters (Renown+Assault) / artifact (Equipment+Civilized) / aggro (Renown+aggro) / control (control+control)
BG SOJ+TTR prowess (Spellbound/Roar+Heroic) / graveyard (graveyard+graveyard) / big mana (Revelation+Colossal)
GU SOU+KSV ramp (ramp+ramp)
UR TTR+LDO prowess (Heroic+prowess)
RW KSV+SOJ stompy (tappy+Revelation) / tapping (tapping+Convoke) / tempo (Tunnels+flyers) / aggro (aggro+aggro) / go-wide (go-wide+go-wide)
WU AND+EIA exalted (exalted+Slipstream) / enchantments (Curses+enchantments) / artifact (artifact+artifact) / graveyard (Disturb+Pressure) / control (control+control)
UB DHM+HLW control (control+control)
BR EIA+RAK crats (crats+crats)
RG HLW+AND stompy (buddy/Journey+4+ damage) / tempo (Journey+Keys)
GW RAK+DHM go-wide (go-wide+go-wide)
WB LDO+TTR plus counters (Renown+power>base) / tempo (Renown/flyers+flyers) / Equipment (Equipment+power>base) / aggro (Renown+power>base) / control (control+control)
BG SOJ+SOU graveyard (graveyard+graveyard)
GU TTR+KSV prowess (Heroic+spell in combat) / ramp (ramp+ramp)
UR SOU+LDO artifact (Civilized+Equipment)
RW KSV+SOJ stompy (tappy+Revelation) / tapping (tapping+Convoke) / tempo (Tunnels+flyers) / aggro (aggro+aggro) / go-wide (go-wide+go-wide)
...and so on, for about a million lines.
I am using regex to find and delete any ten-line entry that contains certain text. It works for certain permutations, but for others the execution ends to prevent ‘eternal matching’.
Working example:
(?<=\n\n)(.+?\n){2}BR EIA\+HLW.+?\n(.+?\n){7}\n
Failing example:
(?<=\n\n)(.+?\n){2}BR AND\+KSV.+?\n(.+?\n){7}\n
What I’m doing is entering the regex, then pressing ‘Find All’. First example finds about a 1000 entries, second is stopped and finds nothing.
a. Why would this be happening, if the only change is a few fixed chars?
b. Is there something I could do with the regex to make it better?
Thank you for any answers.