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
/
\b ( (?<abrev>(?:[A-Z]\.)+) |(?<roman>M{0,4}(?:CM|CD|D?C{0,3})(?:XC|XL|L?X{0,3})(?:IX|IV|V?I{0,3})) |(?<prep>(?i)d?[aoe]s?(?-i)) |(?<first>\w)(?<rest>\w+) ) \b
/
gmxu
Test String
New
alto dO cruzeiro joão paulo II N.S. aparecida N.S. DAS GRAÇAS
Substitution
Processing...
${abrev}${roman}\L${prep}\E\U${first}\L${rest}