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
/
((1+) (1+) a)|((1+) \5(1+) -)|((1+) :)|((1+) (1+) s)|(1+ ~ ?)
/
gm
Input 1
1
New
1 ~ 1 111 111 a - 111 + 1 s - : + 1 111 111 a - 111 + 1 s - : + 1 111111 - 111 a 1 s - : + 11111 111 a 1 s - : + 11111111 1 s - : a 1 11111111 - : a 1111111 : a 1111111 1111111 a
Substitution
${1:+$2$3:${4:+$6:${7:+$8 $8:${9:+$11 $10:}}}}