(new regexp ("(|)"+name+"= ([; ]*)(; | $) "(|) matches the beginning of a line or a space," = ([; ]*)(; | $) "The equal sign character is followed by a non-semicolon string, followed by a semicolon or the end of the string. The plus sign connects three strings to match an equation as a whole. The = sign is preceded by the string in the name variable, followed by the value, and the equal sign is matched to the semicolon or the end of the line.
Extended data:
Regular expression is a logical formula to operate on character strings (including ordinary characters (such as letters between A and Z) and special characters (called "metacharacters"), that is, a "regular character string" is composed of some pre-defined special characters and their combinations, which is a kind of filtering logic to represent character strings. A regular expression is a text pattern that describes one or more strings to match when searching for text.
Baidu Encyclopedia-Regular Expression