Problem with complex regexes with Find

Whereas \w+,\s(\w+) is processed without problem, the "complex" \w+,\s(\w+\s\d{1,2}) could not processed within an acceptable time.

Display Filter had no problem with the "complex regex", but cannot be used in my case because I need to make a replacement.

The "solution" was to replace \w with [a-z] (case-insensitive). Even [a-z0-9]+,\s([a-z0-9]+\s\d{1,2}) brought Find to its "knees".  

This behaviour concerns Studio 2019. 

Parents
  • The regex

    \w+,\s(\w+\s\d{1,2})

    found the text a, aaa 12

    after a gap of ~300 segments instantaneously in my Trados Studio 2019.

    Is it a number of segments big enough to notice the lag?

  • Strange. My document has 3000 segments; the first match at segment 153 took 55 seconds (starting at the first segment)! Even the search starting at segment 135 (3 lines) took 20 seconds, although starting at segment 136 (1 line, as were all intervening segments) was instantaneous.

  • Whether there is something special in segment 135 or a healthy restart will solve the problem.

    I checked the same regex in Notepad++ and it took a noticeable time, but certainly much less than a second, to process 1.7 million chars. I've used some complex regexes taking many seconds to complete, but there is nothing special with yours.

Reply
  • Whether there is something special in segment 135 or a healthy restart will solve the problem.

    I checked the same regex in Notepad++ and it took a noticeable time, but certainly much less than a second, to process 1.7 million chars. I've used some complex regexes taking many seconds to complete, but there is nothing special with yours.

Children