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
r"
^---[^\S\n]*\n(?!.*\bhas joined the conversation\b)(\S.*?)[^\S\r]*$
"
gm
Input 1
1
New
(2021-07-29 01:00:00 AM BST) --- peter.j.matthew has joined the conversation (2021-07-29 01:00:00 AM BST) --- john cheung has joined the conversation (2021-07-29 01:11:19 AM BST) --- allen.p.jonas Hi, james (2021-07-30 12:51:16 AM BST) --- karren wenda how're you ? --- * * *
Substitution
(2021-07-29 01:00:00 AM BST) --- peter.j.matthew has joined the conversation (2021-07-29 01:00:00 AM BST) --- john cheung has joined the conversation (2021-07-29 01:11:19 AM BST) --- allen.p.jonas Hi, james (2021-07-30 12:51:16 AM BST) --- karren wenda how're you ? --- * * *