Regex extractors matching multiple expressions


(Dave Schlegel) #1

I’ve been trying to use regex extractors to recognize multiple patterns in the same field using the “|” (or) operator for a series of expressions.

For example with this input: /api/v1/users/username@somewhere/blah
I’d like it to match “/api/v1/users/” and if that doesn’t match, then report “/api/v1”

I found it does work if the first expression matches

(/api/v1/users/).*|(/api/v1).*

but if there is an earlier non-matching expression it doesn’t seem to match the second expression

(/api/v1/uzers/)|(/api/v1/users/).*|(/api/v1).*

so the expression above reports no match.

Are regexp extractors supposed to recognize the “|” operator for multiple expressions or do I need to use pipeline functions instead ?

Thanks


(system) #2

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