Hi,
trying to add hierarchy. For this, I try to extract "SA" from jobname
D_SA_1040.pdf
The used regex is
(?<=[a-zA-Z]{1}_)[a-zA-Z]{2}
It does not work. Is lookbehind supported by Switch?
Kind regards,
Jörg
regex: Lookbehind not supported?
-
Joerg Schober
- Member
- Posts: 30
- Joined: Mon Mar 21, 2011 2:30 pm
Thanks Freddy for the reply.
There are also other filenames that are different (SE_MM_1804, ...), so the regex needed in production enviroment is
(?<=[a-zA-Z]{1,2}_)[a-zA-Z]{2}
How could i solve this issue. Is a script expression possible?
Supports javascript lookbehind (with variable length)?
It seems most languages only supports lookbehind (if they supports) with fixes length.
Kind regards,
Jörg
There are also other filenames that are different (SE_MM_1804, ...), so the regex needed in production enviroment is
(?<=[a-zA-Z]{1,2}_)[a-zA-Z]{2}
How could i solve this issue. Is a script expression possible?
Supports javascript lookbehind (with variable length)?
It seems most languages only supports lookbehind (if they supports) with fixes length.
Kind regards,
Jörg
-
ArielRauch
- Advanced member
- Posts: 230
- Joined: Thu Aug 07, 2014 10:04 am
If I understand correctly you want to extract the different segments of the name. Should not be a a problem in a script expression.
Nameproper.split("-")
Or did I misunderstand you
Nameproper.split("-")
Or did I misunderstand you