Creating a custom pattern(regx problem)

I am trying to parse a log to only recongize nubmers but the regex, though, it is a valid regex I am still getting a compile error. For example:
Custom pattern:
(?([0,1,2,3]) for:

[Priority: 0]

output:

Compile ERROR

I am new to regex first of all, but I have searched and searched and have yet come up with a solution of why this simple regx expression is getting a compile error, maybe it has to do with the fact logstash uses oniguruma regex?

Your expression appears to open two parentheses but only closes one.

What is [0,1,2,3] supposed to mean? I suspect you actually mean [0123] or [0-3].

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.