Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
r"
-(?:(?<!\b[0-9]{4}-)|(?![0-9]{2}(?:[0-9]{2})?\b))
"
g
Input 1
1
New
Studied b-tech from college in 2010-13 Studied b-tech from college in 2010-2013 Studied b-tech from college in 2010-13 at B-college
Substitution