I know you can use noun extraction to get nouns out of sentences but how can I use sentence overlays/maps to take out phrases?
"First, @action; Second, Foobar"
"First, Dance and Code; Second, Foobar"
I want to return:
action = "Dance and Code"
You can slightly rewrite your string templates to turn them into regexps, and see which one (or which ones) match.
>>> template = "First, (?P<action>.*); Second, Foobar" >>> mo = re.search(template, "First, Dance and Code; Second, Foobar") >>> if mo: print(mo.group("action")) Dance and Code