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
/
(\s\\n).*(PostgreSQL version 10)(.*?(\\n\s)){2}
/
gm
Input 1
1
New
In most cases regexp_matches() should be used with the g flag, since if you only want\n the first match, it''s easier and more efficient to use regexp_match(). \nHowever, regexp_match() only exists in PostgreSQL version 10 and up. When working in older\n versions, a common trick is to place a regexp_matches() call in a sub-select, for\n example:\n