How to Parse Regex Multi

Comments

2 comments

  • Avatar
    Platform Services
    I think I had the same problem as you have and it looked like it was because of the () (home|away) I found I can't use brackets in a field parse regex rule in sumo unless its a capturing group or you get this error, even though its valid as a regular expression
    0
    Comment actions Permalink
  • Avatar
    Caleb Fogleman
    The issue is indeed because of the (home|away) part of the regex, but it is totally usable as an OR statement by defining it as a non-capturing group. This is done by adding '?:' just inside the first parenthesis. So your parse statement would be: | parse regex "(?:home|away)team\":\"(?.*?)\"" multi I hope this helps!
    0
    Comment actions Permalink

Please sign in to leave a comment.