I'm trying to match these lines:
And I want a wildcards["herb"] command being sent to a function of mine, containing the actual herb I ate. The herbs are: wormwood, galingale, kelp, mandrake, orphine, maidenhair, hyssop and juniper. Is this even posible with one line of regexp? I could do it in two triggers, one seperate for the kelp-line, but that'd look oogley. :P So far I've got:
But it doesn't react, at all..
You quickly eat a wormwood root.
You quickly eat a nightshade root.
You quickly eat a galingale flower.
You quickly eat a piece of kelp.
You quickly eat a mandrake root.
You quickly eat an orphine seed.
You quickly eat a maidenhair leaf.
You quickly eat some hyssop stem.
You quickly eat a juniper berry.And I want a wildcards["herb"] command being sent to a function of mine, containing the actual herb I ate. The herbs are: wormwood, galingale, kelp, mandrake, orphine, maidenhair, hyssop and juniper. Is this even posible with one line of regexp? I could do it in two triggers, one seperate for the kelp-line, but that'd look oogley. :P So far I've got:
You quickly eat (a|an|some)(.|piece of.)(?P<herb>\w+)(\.|root\.|flower\.|seed\.|leaf\.|stem\.|berry\.)$But it doesn't react, at all..