hello, I want to match (delete) everything after a word I chosen.
exemple:
text_1
bla bla WORD
text_2
text_3
I made a Regex, but is not working:
(?s)((^.*)(WORD))
Can anyone help me?
hello, I want to match (delete) everything after a word I chosen.
exemple:
text_1
bla bla WORD
text_2
text_3
I made a Regex, but is not working:
(?s)((^.*)(WORD))
Can anyone help me?
(?<=WORD).*$
or just
WORD
(maybe alt+f3 or search and find)yes, works fine, but this regex you gave me will match everything only until the next line, only from the paragraph.
But how can I match (delete) everything after the WORD ?
(?s)
is a setting for the regexp to make .
also match an end of line, and $
match the end of file instead.
this will delete everything after WORD and also the line that contains “WORD”
^.*(?<=(WORD))(?s)(.*$)