html is string like:
<xxx name1 = "value1" name2 = "value2">
How to use regular expression to parse key-value pairs into a hash (like {"name1": "value1", "name2": "value2"}
)? The tag does not matter now.
I am new to ruby and have no idea how to start. Any hints? Thanks
UPDATE
My question is how to use regex to do parsing. I know that third party is a good option. But I am just curious about how to use regex to do parsing.