I have a search method where i'm dynamically creating a regex expression.
For example: Search term = "one word" .
The regex expression look like this:
(\\s*<[^>]+>\\s)*three(\\s*<[^>]+>\\s)*four
From some reason it causing chrome browser to hang.
Any help solving that issue will be more than appreciated
[EDIT]
The searched area looks like that:
<span id="1" title="bbox 483 1557 715 1602; x_wconf 96"><strong><em>one</em></strong></span>
<span id="2" title="bbox 738 1557 986 1592; x_wconf 77"><strong><em>two</em></strong></span>
<span id="3" title="bbox 483 1557 715 1602; x_wconf 96"><strong><em>thre</em></strong></span>
<span id="4" title="bbox 738 1557 986 1592; x_wconf 77"><strong><em>four</em></strong></span>
<span id="5" title="bbox 483 1557 715 1602; x_wconf 96"><strong><em>five</em></strong></span>
<span id="6" title="bbox 738 1557 986 1592; x_wconf 77"><strong><em>six</em></strong></span>
So if I'm looking for the "three four", I should receive those two elements:
<span id="3" title="bbox 483 1557 715 1602; x_wconf 96"><strong><em>three</em></strong></span>
<span id="4" title="bbox 738 1557 986 1592; x_wconf 77"><strong><em>four</em></strong></span>
one
word
`? – VLAZ Feb 17 '20 at 15:13