Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
`
^(?:[^N\n]|N(?:[^O\n]|O(?:[^A\n]|$)|$)|$)+
`
gm
Input 1
1
New
I want to delete anything in a line but stop before the word NOA if that is present in a line. NOA will also follow a colon. 1: NOA Keep this) 2 lkajsflk: DONT KEEP THIS asdlkjfaskldjf: Dont keep this asdfjlka: NOA asdf:NOA(lkjasdlfkjasf) Version: RE2 for Google Sheets
Substitution
I want to delete anything in a line but stop before the word NOA if that is present in a line. NOA will also follow a colon. 1: NOA Keep this) 2 lkajsflk: DONT KEEP THIS asdlkjfaskldjf: Dont keep this asdfjlka: NOA asdf:NOA(lkjasdlfkjasf) Version: RE2 for Google Sheets