New HTML5 Client Triggers with Regex

Is there some magical thing I have to do to get this to work?

I am using all the knowledge of Regex I know to try to do simple things like highlighting my name.

Regex: /pathers/gi

This should trigger on: Pathers PATHERS pathers

but its only triggering on: /pathers/gi

Is there a way to force the client to use my regex or is there another way to do it? I know of this: [Pp]athers but that does not get all caps or mistyped, which i want to include.

Thanks for your help!

Comments

  • edited April 2013
    You could have a try with:

    (P|p|\w)(A|a|\w)(T|t|\w)(H|h|\w)(E|e|\w)(R|r|\w)(S|s|\w)
    Every day sends future to past 
    Every breath leaves me one less to my last
  • that's just annoying, it'll work but it's very unreadable :/

  • Main issue is not this. The main issue that it'll work with any 7 letters word.

    For more safety, I would use (P|p)(A|a)(T|t)(H|h)(E|e)(R|r)(S|s) which won't manage spelling mistakes, but will only match your name.

    And, this in not an unreadable regex, trust me on this point.
    Every day sends future to past 
    Every breath leaves me one less to my last
  • Pathers said:
    Is there some magical thing I have to do to get this to work?

    I am using all the knowledge of Regex I know to try to do simple things like highlighting my name.

    Regex: /pathers/gi

    This should trigger on: Pathers PATHERS pathers

    but its only triggering on: /pathers/gi

    Is there a way to force the client to use my regex or is there another way to do it? I know of this: [Pp]athers but that does not get all caps or mistyped, which i want to include.

    Thanks for your help!
    Regex is case sensitive, so if your regex is "pathers" it will only trigger on it all lower case. As you've noticed, [Pp]athers will catch the first letter capitalised; if you want to catch any combination of upper and lower case, you can extend that same thing: [Pp][Aa][Tt][Hh][Ee][Rr][Ss].

    Yes, it's a bit clunky. If you only care about the three combinations you listed (all lower case, all upper case, only first letter upper case), you could use: [Pp](athers|ATHERS).

  • To reiterate my answer to your feedback e-mail (and make a slight correction), what goes in the criteria field should be only the text you want to match on, not the / designators and modifiers (i, g, m).

    The correction is that it does NOT, as I'm sure you've noticed, automatically apply the "i" (case insensitive) operator. I will provide a flag to have it do so this afternoon and post here when it's live.

    Thanks!

    - Cromm
  • I thought so. I was going to email you back to tell you not to have all flags always set, some reflexes require specific capitalization and only the first occurrence.

    Thanks for taking the time to add this to the triggers though, I'm glad you're active in fixing the problems. :)

    I was wondering if I should post my ideas for further improvement in the ideas forum or some other place?

    Thanks
  • I've just uploaded the change that will allow you to flag a trigger as being "case insensitive" (capitalization doesn't matter). Lemme know if that doesn't solve your problem!
  • Pathers said:
    I thought so. I was going to email you back to tell you not to have all flags always set, some reflexes require specific capitalization and only the first occurrence.

    Thanks for taking the time to add this to the triggers though, I'm glad you're active in fixing the problems. :)

    I was wondering if I should post my ideas for further improvement in the ideas forum or some other place?

    Thanks
    Ideas forum certainly can't hurt, but anything client specific is best submitted through the "Feedback" tab in the client's settings window.

    Thanks!
  • edited April 2013
    No it still doesn't work, I'll supply a screenshot of what I've entered ~ that'll probably be faster than explaining it

    I typed: say Pathers pathers
    into Achaea and only the second 'pathers' is highlighted, meaning the insensitivity is not... insensitive

    image
  • That's actually a bug in the highlighting/gagging that I'm also working on (see the "very experimental" note). That won't be updated until V2 comes out sometime in the near future.

    If you try "say Pathers" and "say pathers" with a Print Locally option, however, they should both work.

    Lemme know if not. Thanks!

  • Ahh yes it works! I guess I'll have to deal with just the beeping sound... which is beta too :P thanks!
Sign In or Register to comment.