Hi I am trying to parse a regEx but I am getting error

Comments

3 comments

  • Avatar
    Harishwer Selvakumar

    Hello Akshay Jaisinghani,

    The Special characters in the RegEx needs to be escaped.
    For this particular case, the double quotes (") seems to end the RegEx expression Statement.

    Thank you

    Regards
    Harishwer Selvakumar
    Customer Success Engineer - Sumo Logic

    0
    Comment actions Permalink
  • Avatar
    Akshay Jaisinghani

    Hi Harishwer Selvakumar

    Thanks for the immediate response , I tried the regex by escaping it but then I got this response. I tried it couple of times the issue was same.

    0
    Comment actions Permalink
  • Avatar
    Akshay Jaisinghani

    Hi Harishwer Selvakumar,

    I tried this:

    _sourceCategory=kubernetes*
    | parse regex "(?<loglevel>level[\\]?[\\\"]?[:=][\\]?[\"]?(([a-zA-Z]*)))" multi

    its working in my case.

    0
    Comment actions Permalink

Please sign in to leave a comment.