I am working on a C# regex to achieve the following result.
command value1 valu2 : param1=value1, param2=[valu2], param3 = vaule3 /option1 |option2
Group1: param1=value1
Group2: param2=[valu2]
Group3: param3 = vaule3
My current regex:
(\w+\s*\=\s*\w+)(,\w+\s*\=\s*[a-zA-Z0-9\]\[]+)*
I am missing to include the following:
- Should start with :
- Should allow [] char into the value section
- Should stop at / or | or end of line
Here is test test: https://regex101.com/r/5kPXAz/1
I have used examples from: