Trying to get a specific part of NameProper with regex

Post Reply
User avatar
magnussandstrom
Advanced member
Posts: 345
Joined: Thu Jul 30, 2020 6:34 pm
Location: Sweden
Contact:

Trying to get a specific part of NameProper with regex

Post 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?
User avatar
magnussandstrom
Advanced member
Posts: 345
Joined: Thu Jul 30, 2020 6:34 pm
Location: Sweden
Contact:

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

Post 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.
patej
Member
Posts: 79
Joined: Sun Nov 25, 2012 12:15 pm

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

Post 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 :)
User avatar
magnussandstrom
Advanced member
Posts: 345
Joined: Thu Jul 30, 2020 6:34 pm
Location: Sweden
Contact:

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

Post by magnussandstrom »

Ok I see, that explains it.
Post Reply