G
Guest
Given some text that looks like:
random Text Key 1.00
More random Text
Item more random text = "Wanted1", "More random Text"
even more random Text
EndItem
Item more random text = "Wanted2", "Quoted Random Text" more Random Text
even more random Text
even more random Text
EndItem
even more random Text
even more random Text
(where the random Text does not contain "Item", "=", or any """")
I would like to, in one Regex, capture such that
Group(1) = 1.00
Group(2) = Wanted1
Group(3) = Wanted2
I have been reduced to using 2 Regexs:
Key (\d\.\d+) -- to capture the 1.00 and
Item[^=]+=\s?"(\w+)" to capture Wanted1 and Wanted2
All attempts to combine the two Regexs result in (at best):
Group(1) = 1.00
Group(2) = Wanted2
I understand that the greedy match leads me to this result, but it seems to
me that this should be doable in 1 Regex.
random Text Key 1.00
More random Text
Item more random text = "Wanted1", "More random Text"
even more random Text
EndItem
Item more random text = "Wanted2", "Quoted Random Text" more Random Text
even more random Text
even more random Text
EndItem
even more random Text
even more random Text
(where the random Text does not contain "Item", "=", or any """")
I would like to, in one Regex, capture such that
Group(1) = 1.00
Group(2) = Wanted1
Group(3) = Wanted2
I have been reduced to using 2 Regexs:
Key (\d\.\d+) -- to capture the 1.00 and
Item[^=]+=\s?"(\w+)" to capture Wanted1 and Wanted2
All attempts to combine the two Regexs result in (at best):
Group(1) = 1.00
Group(2) = Wanted2
I understand that the greedy match leads me to this result, but it seems to
me that this should be doable in 1 Regex.