2 Replies Latest reply on Jun 2, 2017 1:36 PM by dsmevolution1

    Trouble with some RegEx in a customer parser

    dsmevolution1

      I've been tasked with creating a set of custom parsers for one of our in house applications.  At this point, I am about 85% to 90% of the way there for capturing all of our event types.  Our applications/dev team has created a field where the output that i've set as a capturing group comes up in one of two ways.

       

       

      ClientId:00000000-0000-0000-0000-000000000000

       

       

      or

       

       

      ClientId:NULL

       

       

      The second one is simple enough as I can capture that with a simple (?:\w+)(\w+)

       

       

      The first one is kicking me in the rear.  Obviously it fails the regex used for the second pattern, but if I write out the pattern explicitly enough to capture the first patter of the zeroes and dashes, I then not get the second pattern.  What i'm looking for is a set of expression that is truly accepting of random variable, regardless of their content.  I've tried left to right boundaries and anchors, but I am getting no where.

       

       

      Let me also mention that I am an extreme newbie in RegEx and essentially had to teach myself the basics in a day.  So any help here I could get would be MAJORLY appreciated!

       

       

      Thanks in Advance,

      Tim