Page 2 of 2

Re: Making a automated healing trigger.

Posted: Tue Apr 23, 2013 8:32 pm
by Jor'Mox
You could also have adjusted the triggering line to something like this.

(.*?)\s+(\d+)hp

The question mark after the * should mean that it grabs the fewest number of characters to still match the pattern, so it should leave the trailing spaces to be handled by the \s+ immediately following it. Not especially critical for something that can be fixed with a simple trim, but it can be invaluable in more complex situations.