I am trying to create an alternative data entry in which the user expresses some kind of command that I will analyze. Instead of going into the details of the vocabulary, I would use in this effort an example of what I'm trying to accomplish with the help of bindings to Rex Harrison.
given the following sentences
rain in spain falls on the plain
rain falls on a plain in spain
snow falls in a meadow in london
in pseudo regular expression:
(the (?<weather>\w+)) (in (<?city>\w+)) (falls) (on the (?<topography>\w+))
In short, I need to collect weather, city and topography from the proposal using RegEx.
How can I express a set of captures that can occur at the input in any order?