Highlighted

RegExp format in Lookup Extension

Silver Contributor
Silver Contributor

Hey guys.

 

Question as I can't seem to get RegExp working at all as a Lookup table match type in an extension. I've got some other fairly complex regexp working on the load rules side.

 

Is there a specific format that is acceptable or not for the lookup table processing logic? I'm trying to do something simple: if the incoming orderid is 6 digits, assign "ren" to conv_type. If the orderid is 7 digits, assign "new" to the variable. I'm using:

 

^\d{6}$ and

^\d{7}$

 

for matching - I've tried this with with matching slashes /^\d{6}$/ and without, and I still don't match anything. Just outputting the error value.

 

Thanks for you help !

1 REPLY 1
Highlighted

RegExp format in Lookup Extension

Silver Contributor
Silver Contributor

Never mind - got it to work. Thought to escape special characters as in PHP processing vs JS processing; worked as:

 

/^\\d{6}$/

 

Thanks !