Hi, @chamzon-chamzon, @lycan-thrope, @peterjones and All,
OK… I understand that in real cases, this causes a complete failure of the regex engine :-(( Why ?
Well, let’s suppose the temporary file containing, first, your entire firewall configuration file followed with your entire IP-adresses list file
Now, imagine the worst case : an unique match between the first IP-address of your firewall configuration file and the last IP-address of your IP-adresses list
Then, and despite I use a non-capturing regex group, the part of the regex (?s:.*?...) represents all the characters, included line-endings, right after the first IP-address till the same IP-address excluded, at the very end of file
As you said that your firewall configuration file has about 68,000 lines, it’s easy to guess that it probably exceeds the capacity of the regex engine to handle such a gap of chars !!
So, in order to find out, somehow, a work-around to this situation, could you give me :
The number of lines of your firewall configuration file and its approximate size
The number of lines of your IP-addreses list and its approximate size
A short example of your real firewall configuration file
A short example of your real IP-addresses list
In order to get the raw text, click on that button, when writing your post, to insert text in the right way !
41d95003-7608-410a-958d-539e9c906c41-Capture d’écran 2022-03-07 123711.png
Thanks for your time to collect these infos !
Best Regards,
guy038