I'm trying to build an alternative data entry, wherein the user will express some sort of command, that i'll parse. Rather than go into the details of the vocabulary I would be using in this effort here's an example of what I'm trying to accomplish with appoligies to Rex Harrison.
given the following sentences
the rain in spain falls on the plain
in spain on the plain falls the rain
on the meadow the snow falls in london
in pseudo regex:
(the (?<weather>\w+)) (in (<?city>\w+)) (falls) (on the (?<topography>\w+))
in short I need to harvest out of the sentence the weather, city and topography, using RegEx.
How do I express a set of captures that can occur in the input in any order?