Announcement

Collapse
No announcement yet.

Match String Regular Expression help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Jayhawk
    replied
    Thanks! That worked!

    Leave a comment:


  • teladog01
    replied
    Maybe something like this:

    ^summer$|^winter$|^save energy$|^GstWtr$

    This will match a string that is exactly one of the four, i.e. no characters before or after the word(s). You can test it out at a regex tester site like this one.

    How are you testing the HS event? Don't forget that if you are manually triggering the event by clicking on the "run" button, then all conditions are ignored and the event actions will always be executed.

    Leave a comment:


  • Jayhawk
    started a topic Match String Regular Expression help

    Match String Regular Expression help

    Want to check device string content for specific values... the device will have a string of a single word... looking only for: summer, winter, save energy or GstWtr
    Thinking I can use AND IF This device's string matches this regular expression (for device name) 's string matches this regular expression xxxxx
    Tried reading the Regex website directions and made some guesses of a Regular Expression of the current string value (summer) but my guesses are poor... everything tested true regardless.

    What would be a regular expression for the one-word string I want to match?
Working...
X