Announcement

Collapse
No announcement yet.

REGEX help, please...

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

    REGEX help, please...

    Recently, my phone company has started prefixing the CallerID with:

    Spam?
    SPAM?
    Robo?, or
    ROBO?

    In the UltraCID PI, I added the following to "Use Name Block Mask," but it doesn't seem to be working. The REGEX Checker I normally use declares a "full match" with the 4 examples above. What am I doing wrong?

    |S(?i)pam(?-i)\?.*|R(?i)obo(?-i)\?.*|
    HomeSeer Version: HS3 Pro Edition 3.0.0.500
    Operating System: Microsoft Windows 10 Pro - Work Station

    Enabled Plug-Ins:
    2.1.0.119: AmbientWeather | 3.0.21.0: BLLock | 2.0.24.0: BLUPS | 1.3.6.0: Device History | 3.0.0.56: EasyTrigger | 3.1.0.7: MeiHarmonyHub | 3.0.6681.34300: UltraCID3 | 3.0.6644.26753: UltraLog3 | 3.0.6554.33094: UltraMon3 | 3.0.0.91: weatherXML | 3.0.1.245: Z-Wave | 3.0.51: HS Touch Designer | 3.0.0.40 Z-Seer+

    #2
    I like to see what is happening so I use this regex tester on line

    https://regex101.com/

    I used this as the string - not as elegent but works.

    [Ss][Pp][Aa][Mm]\?.*|[Rr][Oo][Bb][Oo]\?.*

    or slightly cleaner

    (?i)spam\?|(?i)robo\?

    or to force it to look at the start of the string

    ^(?i)spam\?|^(?i)robo\?

    I also do not understand the or symbol at the start and end of your expression?

    Here is the cheatsheet I use: https://www.rexegg.com/regex-quickstart.html#chars

    Comment


      #3
      Originally posted by AllHailJ View Post
      I like to see what is happening so I use this regex tester on line

      https://regex101.com/

      I used this as the string - not as elegent but works.

      [Ss][Pp][Aa][Mm]\?.*|[Rr][Oo][Bb][Oo]\?.*

      or slightly cleaner

      (?i)spam\?|(?i)robo\?

      or to force it to look at the start of the string

      ^(?i)spam\?|^(?i)robo\?

      I also do not understand the or symbol at the start and end of your expression?

      Here is the cheatsheet I use: https://www.rexegg.com/regex-quickstart.html#chars
      Thanks, I'll try those. The "ors" came from cutting it out the middle of a list.

      Note: My antivirus alerted on the above link. Apparently the page is calling another page that it deems suspicious.
      Last edited by ewkearns; August 24, 2020, 01:21 PM. Reason: Antivirus alert warning.
      HomeSeer Version: HS3 Pro Edition 3.0.0.500
      Operating System: Microsoft Windows 10 Pro - Work Station

      Enabled Plug-Ins:
      2.1.0.119: AmbientWeather | 3.0.21.0: BLLock | 2.0.24.0: BLUPS | 1.3.6.0: Device History | 3.0.0.56: EasyTrigger | 3.1.0.7: MeiHarmonyHub | 3.0.6681.34300: UltraCID3 | 3.0.6644.26753: UltraLog3 | 3.0.6554.33094: UltraMon3 | 3.0.0.91: weatherXML | 3.0.1.245: Z-Wave | 3.0.51: HS Touch Designer | 3.0.0.40 Z-Seer+

      Comment

      Working...
      X