Multiple pattern match error?


I’m having issues with multiple regex patterns failing to find a match in the pattern match step.
it appears to work with 2 patterns at the same time, but anymore it breaks. I use comma as a delimiter

i.e Severity={{Severity:/[a-zA-Z0-9%.-]+/}},PrincipalId={{PrincipalId:/[a-zA-Z0-9+.%]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}/}}

^will find a match. however,


^will fail

Screenshot 2022-03-22 at 17.10.53

@jerusalem_strangely Let me play with this and see if I can find a solution for you. Do you have a sample string of what you are trying to match?

pretty simple try:, Severity=HIGH

This worked for me to create four variables and find all of them.

Test String:,Severity=HIGH,Other=Another,Four=Five

RegEx: PrincipalId={{PrincipalId:/[a-zA-Z0-9+.%]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}/}},Severity={{Severity:/[a-zA-Z0-9%.-]+/}},Other={{Other:/[a-zA-Z0-9%.-]+/}},Four={{Four:/[a-zA-Z0-9%.-]+/}}


@jerusalem_strangely, what does breaking/failure look like specifically? A warning/error message, or just not matching?

does it display the output, however?

I tried to push the output to slack but it doesn’t return the value of the variable for multiple of the matches.

it just doesn’t match

1 Like

so i just retested it with the test string and it worked. the issue was the input i use to test it, it appears I need to strengthen my regex instead

RegEx is a giant pain, I like to use to build out an RegEx I am trying to use.

1 Like