I have this string:
Parameter1="Something related to this" Parameter2="Another value" Parameter3='Single quotes are permitted' Parameter4="Even HTML entities are permitted"
I want to get this list:
- Parameter1=Something related to this
- Parameter2=Another value
- Parameter3=Single quotes are permitted
- Parameter4=Even HTML entities are permitted
I tried this regex. But it's not working:
(\w+)=(('|"|")).*(('|"|"))
How can I parse this string and extract key-value pairs?
(\w+)=(['"]|")(.*?)\2, see regex101.com/r/rjIBB2/1"e;in C#. I tested in RegexHero."e;entity, there is only". You have a typo in the sample string.