Not your name Regex code

Post Reply
Alkerion
Posts: 3
Joined: Sun Oct 19, 2014 11:14 pm

Not your name Regex code

Post by Alkerion » Sun Oct 19, 2014 11:20 pm

Ok I've used this code before and it has been awhile since Sony has made a raid that needed it but the beta raids do have a new one. This is the code that I'm using for checking it to NOT be my name.

(?!{C})

Now that code will trigger a positive audio trigger even if it IS my name. I even simplified my check to making a bogus emote that was nothing more than:

(?!{C}) test

So anything entered with the word test after it should trigger that BUT my name. However entering "Alkerion test" still triggered the emote. I am using version 1.0.18.6.


As an aside I've also noticed that for some reason Regex coding doesn't work at all when messing around on the beta server. Regular emotes work fine but as soon as you add in Regex then you get nothing. That very well could be Sony screwing something up though. Any time I get a new emote from beta I can build it while on beta but I have to go back to the live server to test it out.

Gimagukk
Site Admin
Posts: 237
Joined: Wed Oct 26, 2011 9:29 pm

Re: Not your name Regex code

Post by Gimagukk » Tue Oct 21, 2014 6:06 pm

Can you give me an example of a regex trigger that is not working for you on beta? There should not be any difference since GINA just reads the text written to the log file -- unless EQ is writing something different to the log file than what it is displaying on the screen.

The ?! is a tricky Regex construct due to the greedy nature of Regex matching. You really need to supply context before and after the portion of text that contains the character name (either yours or another's) so that the match will work. Below are some examples based a sample line being matched for a character whose name is Rehtsucks:

Actual line: Bigmob smacks Rethsucks for 10 points of damage.
Search text: Bigmob smacks ((?!{C}).+) for {N} points

This will match when Bigmob smacks anyone other than your character (Rehtsucks). If the character's name is at the beginning or end of the line being matched, you should provide anchor tags:

Actual line: Rehtsucks looks pale.
Search text: ^((?!{C}).+) looks pale\.

Actual line: No ending punctuation on this line for Rehtsucks
Search text: this line for ((?!{C}).+)$

Alkerion
Posts: 3
Joined: Sun Oct 19, 2014 11:14 pm

Re: Not your name Regex code

Post by Alkerion » Tue Oct 21, 2014 8:42 pm

Beta line

a praetor august magio says 'Alkerion feels faint claws scraping skin

a praetor august magio says(.+'{C}) feels faint claws scraping skin

a praetor august magio says 'Meshiax feels faint claws scraping skin

I have tried the following with no success.

a praetor august magio says(.+'(?!{C})) feels faint claws scraping skin

and

a praetor august magio says '(?!{C}) feels faint claws scraping skin

The self line (top) works fine on live but the two tested below do not.

Yeah as much as I figured Sony somehow is screwing things up on beta as older raid emotes that I KNOW work I tested on beta after I guessed that beta was screwing it up and anything with regex coding isn't working on beta. So I have to get the raw text from beta then jump to live to actually test it.

Gimagukk
Site Admin
Posts: 237
Joined: Wed Oct 26, 2011 9:29 pm

Re: Not your name Regex code

Post by Gimagukk » Sat Oct 25, 2014 10:38 am

Your syntax is a little off -- it should be:
a praetor august magio says '((?!{C}).+) feels faint claws scraping skin

If you want to capture the name of the other character to use in display / clipboard / voice text, you would do:
a praetor august magio says '(?<who>(?!{C}).+) feels faint claws scraping skin

This would allow you to use ${who} in the other text fields to show who was called.

Alkerion
Posts: 3
Joined: Sun Oct 19, 2014 11:14 pm

Re: Not your name Regex code

Post by Alkerion » Sun Oct 26, 2014 8:01 pm

Thanks for the help. :)

Post Reply