I have a big file with long lines. I want to get the values matching my regex only.
My line:
XXXXXXXXXXXXXX;XXXXXXXXXXXX;XXXXXXXXXXXXXXXXX;666=0;XXXXXXXXXXXXXX;XXXXXXXXXX;XXX
I need to get only the value right after 665 in all lines. example: ;665=.;
so results should look like:
;665=1;
;665=5;
;665=B;
;665=AB;
And not the whole lines. The reason is that the result is always truncated in the search window
^.+(;666=[^;\r\n]+;).+$
$1
. matches newline
Explanation:
^ # beginning of line
.+ # 1 or more any character but newline
( # group 1
;666= # literally
[^;\r\n]+ # 1 or more non semicolon and non linebreak
; # a semicolon
) # end group
.+ # 1 or more any character but newline
$ # end of line
Screenshot (before):
Screenshot (after):