Hello,
I'm fairly new to working with Interchange and am running into a syntax issue.
The problem I am trying to solve is deciphering between tracking numbers from two different shipping companies, and displaying a different message depending on which company the tracking number belongs to. Each company has its own set of rules for how the tracking number is structured, so its fairly straightforward to use a regular expression in order to pick apart the number.
I am using the "if" ITL Tag in order to check the variable against the regular expression, but I am running into a comparison issue. The line is "[if tracking_number =~ /^[0-9]{12}$/]" and it should return true if the characters are between 0-9 and the number is 12 digits long. Is it possible to compare a variable to a regular expression in the "if" tag? If so, am I doing the regular expression comparison incorrectly?
Best,
Mihai Dan
Air Delights
mihai@airdelights.com
_______________________________________________
interchange-users mailing list
interchange-users@interchangecommerce.org
https://www.interchangecommerce.org/mailman/listinfo/interchange-users
I'm fairly new to working with Interchange and am running into a syntax issue.
The problem I am trying to solve is deciphering between tracking numbers from two different shipping companies, and displaying a different message depending on which company the tracking number belongs to. Each company has its own set of rules for how the tracking number is structured, so its fairly straightforward to use a regular expression in order to pick apart the number.
I am using the "if" ITL Tag in order to check the variable against the regular expression, but I am running into a comparison issue. The line is "[if tracking_number =~ /^[0-9]{12}$/]" and it should return true if the characters are between 0-9 and the number is 12 digits long. Is it possible to compare a variable to a regular expression in the "if" tag? If so, am I doing the regular expression comparison incorrectly?
Best,
Mihai Dan
Air Delights
mihai@airdelights.com
_______________________________________________
interchange-users mailing list
interchange-users@interchangecommerce.org
https://www.interchangecommerce.org/mailman/listinfo/interchange-users