I have a string that looks like the following:
attr one = 1 attr two = 2
I would like to extract each attr x = y (where x and y can be anything including whitespace, not just numbers for example: attr name = Jonah).
I tried the following pattern: Regex pattern = new Regex(@"attr\s+(?<name>.*)\s+=\s+(?<value>.*)") but it returns the entire string in a single match and doesn't separate them.
How can I achieve that?