Problem with [. -]

Problem with [. -]

2
NewbieNewbie
2

    Jul 14, 2004#1

    Any idea why using [. -] on 65040HW.1654B yields HWB instead of 65040HW1654B? The way the help file is written that regexp I used should strip out any period space or dash, but it's removing everything except the letters. That doesn't make any sense to me at all.

    1
    NewbieNewbie
    1

      Jul 14, 2004#2

      I believe your problem is that its attempting to interpret the - (dash) character in your square brackets as a range.

      For example, [a-z] specifies a range of lowercase characters.

      If you use [. ^-] (placing a caret prior to the dash) it appears to work for the UltraEdit regular expression engine.

      Hope that helps,
      -- Tim

      2
      NewbieNewbie
      2

        Jul 14, 2004#3

        AHA! Thanks!!!

        2
        NewbieNewbie
        2

          Jul 14, 2004#4

          A backward slash should also work [. \-] for the Unix regular expression engine or something like [0-9A-Z]-[0-9A-Z]