Getting KM to match my regex correctly

I have this regex working well - https://regex101.com/r/zPEZno/3

However in KM it isn't getting the same result...

I should just be getting back Abigail nothing else. Basically I want to get whatever is at the end of that URL but get the first part so it would return the following

AbigailJesus would return Abigail
Abigailjesus would return Abigaljesus
Abigail34Jesus would return Abigail

My regex seems to have this part already nailed when I input into regex101, however once in KM it is causing me issues there.

Haven’t tested it, but maybe the “ignoring case” setting?

1 Like

Your RegEx101 snippet and your KM screen shot do NOT match.
Further, your examples do NOT contain either "direct" or "insert" as per your RegEx patterns.

So, it is not clear what your real requirements are, but maybe this will help:

RegEx:
(?m)(?:list|device)\/([A-Za-z][a-z]+).*$

For details, see: regex101: build, test, and debug regex

The results you want are in the first Capture Group.

image

1 Like

you're the best! as ever :smiley: