notepad++ – regex: select multiple lines in npp

I have a log file with the following structure:

20:43:36.452 [18856] [1] start trace line 1
20:43:36.455 [18856] [1] start trace line 2
20:43:36.569 [18856] [1] start trace line 3
20:44:01.749 [18856] [1] INFO : Init flow
20:44:01.764 [18856] [1] DEBUG: line 
20:44:01.860 [18856] [1] DEBUG: line 
20:44:01.861 [18856] [1] DEBUG: ID123
20:44:01.864 [18856] [1] DEBUG: line
20:44:02.009 [18856] [1] DEBUG: line
20:44:31.969 [18856] [1] INFO : Init flow
20:44:31.974 [18856] [1] DEBUG: line 
20:44:31.975 [18856] [1] DEBUG: line 
20:44:32.029 [18856] [1] DEBUG: ID456
20:44:32.030 [18856] [1] DEBUG: line
20:44:32.039 [18856] [1] DEBUG: line
20:44:32.109 [18856] [1] INFO : Init flow
20:44:32.109 [18856] [1] DEBUG: line 
20:44:32.109 [18856] [1] DEBUG: line 
20:44:32.179 [18856] [1] DEBUG: ID789
20:44:32.179 [18856] [1] DEBUG: line
20:44:32.179 [18856] [1] DEBUG: line
20:44:32.289 [18856] [1] INFO : Init flow

Is it possible to select from line “INFO : Init flow”, over an ID to “INFO : Init flow”?

For example, if I search on ID123, I want to select following lines:

20:44:01.749 [18856] [1] INFO : Init flow
20:44:01.764 [18856] [1] DEBUG: line 
20:44:01.860 [18856] [1] DEBUG: line 
20:44:01.861 [18856] [1] DEBUG: ID123
20:44:01.864 [18856] [1] DEBUG: line
20:44:02.009 [18856] [1] DEBUG: line
20:44:31.969 [18856] [1] INFO : Init flow

I’ve tried multiple regex-examples and the website regex101.com/

I’m confused with the lazy search (lookbehind and lookahead).

Read more here: Source link