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
/
(?<![#{\w])\w+(?![\w}])
/
gm
Input 1
1
New
GOAL: Extract every word-that-is-not-a-variable-from-an interpolated-string Examples : 'The variable 1 is #{vf a sr} abc' 'the variable 2 is #{var}' 'the variable is something' 'The variables are #{ b } and #{&c&}'
Extraction
GOAL: Extract every word-that-is-not-a-variable-from-an interpolated-string Examples : 'The variable 1 is #{vf a sr} abc' 'the variable 2 is #{var}' 'the variable is something' 'The variables are #{ b } and #{&c&}'