Page 1 of 1

Trying to get a specific part of NameProper with regex

Posted: Wed Jun 09, 2021 9:44 pm
by magnussandstrom
Hi, I need to get a specific part of a filename (NameProper) as a variable in a Switch flow.

This is my NameProper: SOR808080_QP - @ 1, 2 (This is the string I want)_1010.abc
And I want: This is the string I want

My regex is (in the Search-field in Variables tab): (?<=\()(.*?)(?=\))

When I try it on https://regex101.com it works good, but in Switch it donät give me any result at all. Any suggestions how to solve it?

Re: Trying to get a specific part of NameProper with regex

Posted: Wed Jun 09, 2021 9:59 pm
by magnussandstrom
I noticed that I could use the Before and After in this case, but It would be good to know why the regular expression did not work.

Re: Trying to get a specific part of NameProper with regex

Posted: Wed Jun 09, 2021 10:02 pm
by patej
magnussandstrom wrote: Wed Jun 09, 2021 9:59 pm I noticed that I could use the Before and After in this case, but It would be good to know why the regular expression did not work.
That's because of "Note: Positive and negative lookbehind are currently not supported." in here: https://www.enfocus.com/manuals/UserGui ... sions.html :)

Re: Trying to get a specific part of NameProper with regex

Posted: Wed Jun 09, 2021 10:47 pm
by magnussandstrom
Ok I see, that explains it.