Another simply SMAT search question

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Another simply SMAT search question

  • Creator
    Topic
  • #53180
    Mark Perschbacher
    Participant

      Hey all, I using this script to find SMAT messages that exactly match last name Mueller

      rPID(?:[^|]*|){5}(MUELLER^)

      how would I alter it to find names that contain Mueller?

    Viewing 4 reply threads
    • Author
      Replies
      • #76838
        bill bearden
        Participant

          That is a little tougher. I expect someone else will come up with a better solution than this. But give it a shot and let us know if it worked. I don’t know what your ?: does so maybe that could replace my mess. The mess of stuff I used is supposed to match all reasonable characters but pipe. I took the ^ out of it.

          Exact match

          rPID(?:[^|]*|){5}(MUELLER^)

          MUELLER somewhere in the middle

          rPID(?:[^|]*|){5}([A-Z,a-z,0-9,/,-, ]*MUELLER[A-Z,a-z,0-9,/,-, ]*^)

          I don’t think you need the parens around MUELLER^. I left them in. You need them around that first bit so the {5} is applied to the whole group of things in the parens.

        • #76839
          Mark Perschbacher
          Participant

            Bill, thanks for replying.  Well, I pasted that into the reg. expression window, but it didn’t find it.  I’ll play around with it some more.

          • #76840
            bill bearden
            Participant

              Can you post an example of a name you are trying to match?

            • #76841
              Keith McLeod
              Participant

                How about

                rPID(?:[^|]*|){5}([^||^]*MUELLER[^||^]*)

                The ?: means non-capturing parentheses, otherwise matches in parentheses can be captured to ordered variables.

                A downside to above would be that numbers and other characters around MUELLER will also satisfy the regular expression.

              • #76842
                Mark Perschbacher
                Participant

                  Keith, that did the trick, many thanks.

              Viewing 4 reply threads
              • The forum ‘Cloverleaf’ is closed to new topics and replies.