Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
class(?=="(?:field|.*?\sfield|field\s.*?)")
/
g
Input 1
1
New
Ex1: should match both of these: <div class="something else field">Foo</div> <div class="field something else">Foo</div> <span class="field">Bar</span> Ex2: should not match <div class="baseball-field baz">Baz</div>
Extraction