Auto Heal Trigger only half works

Post Reply
Azazel
Posts: 2
Joined: Tue Jan 02, 2018 6:13 pm

Auto Heal Trigger only half works

Post by Azazel »

I have a trigger set up to read the state line as follows: 2710Hp 880Ma 240Mv 0Lev [23%]> I have one for when then percentages are not present and one for when they are. It currently is set up as in the image attached, I can't quite firgure out what is wrong with the line with the percentages but the trigger fires correctly otherwise.

Thanks for any help

-Az
Screen Shot 2018-01-02 at 1.19.34 PM.png

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Auto Heal Trigger only half works

Post by Jor'Mox »

You have square brackets that you want to use as part of your pattern, but they are special characters, so you need to escape them for your pattern to work properly. Like this: (.*)Hp (.*)Ma (.*)Mv (.*)Lev \[(.*)%\]>

Azazel
Posts: 2
Joined: Tue Jan 02, 2018 6:13 pm

Re: Auto Heal Trigger only half works

Post by Azazel »

Hi!

looks like that worked like a charm, thanks so much for the assist!

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Auto Heal Trigger only half works

Post by SlySven »

Yeah, in a regexp a basic [abc] matches a single character that is one of those inside the square brackets, in this case either 'a' or 'b' or 'c' there are some extras but you can read up on those if you like...

Post Reply