Matching on NOT comma

Matching on NOT comma

1
NewbieNewbie
1

    Sep 20, 2006#1

    I am trying to set up a function string to distinguish between:

    TEST # 9999 (other text)
    and
    TEST # 9999, (other text)

    I want to select the first version and not the second

    If I use:
    /Function String 1 = "TEST # [0-9]+[ ]"

    it works OK. But I want to match on the absence of the comma not the existence of the space so tried:

    /Function String 1 = "TEST # [0-9]+[~,]"
    to match on NOT the comma and it does not work. I do not understand why not. Could someone help? Thanks in advance.

    6,683583
    Grand MasterGrand Master
    6,683583

      Sep 21, 2006#2

      Use    /Function String 1 = "TEST # [0-9]+[~,0-9]"

      It looks like the UltraEdit regex engine has a problem on which character [~,] should be applied after [0-9]+. It is always a problem when a range of characters follows a range of characters and the 2 ranges have an overlapping character set. [~,] exactly means all characters except , and not NOT ,. The additional 0-9 in the 2nd ALL EXCEPT range helps in this situation because the 2 ranges then don't have an overlapping character set anymore.
      Best regards from an UC/UE/UES for Windows user from Austria