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
/
volume|part|(?<!, )(?:vol|pt)|(?:vol|pt)(?!\.)
/
gi
Input 1
1
New
Should Match: a) Any occurences of "Volume" OR "Part" (Case Insensitive); b) Any occurence of "vol" or "pt" (CI) that does not have [[comma][space] before AND [period] after; My volume 1 My name vol2. My, volume 1 , pt. vol2. , part. , pt. , pt , vol . pt. // Should match below as there is no [period] after it The Red Pill, Pt 2 , Pt 2
Substitution
Should Match: a) Any occurences of "Volume" OR "Part" (Case Insensitive); b) Any occurence of "vol" or "pt" (CI) that does not have [[comma][space] before AND [period] after; My volume 1 My name vol2. My, volume 1 , pt. vol2. , part. , pt. , pt , vol . pt. // Should match below as there is no [period] after it The Red Pill, Pt 2 , Pt 2