Regular Expressions 101

Regex for matching assignments

Open Workspace
  • JavaScript
  • Match
1

Regular Expression

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

Description

Match the java assignments and get the assigned value

Submitted by mohamedrias