Date Posted:
Product: TIBCO Spotfire®
Product: TIBCO Spotfire®
Problem:
How to prevent the backslash character (\) from being escaped in a Parameterized Information Link.
Solution:
If you create an Information Link that has an input parameter defined, passing it a string with the backslash character (\) may cause the backslash character to be removed.
The Information Link SQL query shown in the following example has the input parameter in the WHERE clause:
SELECTR1."TEXT" AS "TEXT" FROM "DBUSER"."REGEX1" R1
WHERE
?regex_parameter
If you specify a regular expression as the input parameter value for the ?regex_parameter, like this:
- REGEXP_INSTR(TEXT, '+@\w+(\.\w+)+') > 0then the parameter value will get passed as:
- REGEXP_INSTR(TEXT, '+@w+(.w+)+') > 0 because all of the backslash characters get removed.This can be verified in the sql.log file in the TIBCO Spotfire Server logs folder.
-- REGEXP_INSTR(TEXT, '+@\\\\w+(\\\\.\\\\w+)+') > 0
This will be resolved as the desired expression, with one backslash in each intended position in the string:
-- REGEXP_INSTR(TEXT, '+@\w+(\.\w+)+') > 0
Comments
0 comments
Article is closed for comments.