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"
(?<!os\.)\bpath\b
"
g
Input 1
1
New
if path and not os.path.sep in path chaos.path won't match but as.path will, as it checks for literal os. pathhello and worldpath won't match due to word boundaries O'path will.
Substitution
if path and not os.path.sep in path chaos.path won't match but as.path will, as it checks for literal os. pathhello and worldpath won't match due to word boundaries O'path will.