I am trying to figure out a way to match any one word before a known word.
In these examples I am trying to match the word before 'has' so I can pass it on to other triggers so my client knows what has just died.
I am matching these.
For these examples I only want the words 'rat' or 'spirit'. Not 'dirty rat' or 'ancient red spirit'. The exact number of adjectives before the main word is unknown but the following word 'has' is constant.
I have tried this but I only get 'rat has' at %3.
How can I get this to work so it matches the word just before 'has'?
(Using Mushclient version 4.73)
In these examples I am trying to match the word before 'has' so I can pass it on to other triggers so my client knows what has just died.
I am matching these.
Quote:
A dirty rat has been defeated.
or
An ancient red spirit has been defeated.
A dirty rat has been defeated.
or
An ancient red spirit has been defeated.
For these examples I only want the words 'rat' or 'spirit'. Not 'dirty rat' or 'ancient red spirit'. The exact number of adjectives before the main word is unknown but the following word 'has' is constant.
I have tried this but I only get 'rat has' at %3.
Quote:
^(A|a|an|An|the|The) (.*?) (.*? has) been defeated\.$
^(A|a|an|An|the|The) (.*?) (.*? has) been defeated\.$
How can I get this to work so it matches the word just before 'has'?
(Using Mushclient version 4.73)