Regular Expressions 101

Community Patterns

Regex for matching assignments

1

Regular Expression
ECMAScript (JavaScript)

/
^((?:\w+)[^=;]+)=?\s*([^;]+)
/
gm

Description

Match the java assignments and get the assigned value

Submitted by mohamedrias - 9 years ago