Look behind regex in StringSearcher
I'm trying to use the following regular expression in StringSearcher (?<=Switch Description ).{5} So for example applied to the following text "Switch Description 1757A" it would find "1757A" However, im getting the following message "couldn't compile regular expression pattern: quantifier operand invalid" Anyone know why this is?
Hi,
Some modules of FME including the StringSearcher use Tcl to perform regex operations internally, and Tcl regex engine seems to be one which doesn't support lookbehind unfortunately. See also here.
Takashi
Thanks Takashi. I guess i'll have to find the whole string then split it.
Yup, if you need to split a text starting with "Switch Description" into the description text and the last 5 characters, this regex would work for the StringSearcher, for example.
(Switch Description)\s*(.{5})
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.