BookmarkSubscribeRSS Feed
timlhill
SAS Employee

Upcoming Change to Regular Expression Library

If you have creatives or formats that use the REGEX or SPLIT formatting tokens, an upcoming change might affect how your regular expression patterns behave when they are referenced in these tokens. If you do not use the REGEX or SPLIT tokens, this change does not affect you.

The REGEX or SPLIT tokens will begin using a different underlying library to parse the regular expression pattern and perform searches. The new library is faster and more reliable than its predecessor.

Regular expression grammars can vary from one library to another. While internal testing at SAS has found no incompatibilities between the old and new libraries, we cannot rule out that some esoteric parts of the regular expression grammar could behave differently and give different results.

The current library is the default library until April 1, 2022. Beginning on April 1, 2022, the default library will be changed to the new library. However, both libraries are available now.

Before SAS changes the default library, test your creatives and formats that use the REGEX or SPLIT tokens to verify that they behave as expected using the new library. You can do this by adding the following argument to the token reference:

For SPLIT, the syntax is: %%token:SPLIT,<regex pattern>,<version>%%

For REGEX, the syntax is: %%token:REGEX,<regex pattern>,<replacement pattern>,<version>%%

Use <version> = 1 for the current library and <version> = 2 for the new library.

When the <version> argument is not provided, the current library is used for that token until April 1, 2022. Beginning on April 1, 2022, the new library is used.

On May 1, 2022, support for the current library will be removed. At that time, the <version> argument will be ignored and only the new library will be available.

If you have questions, contact SAS Technical Support.

This is a knowledge-sharing community for our customers. 
To get the most from your community experience, use these getting-started resources: 

Discussion stats
  • 0 replies
  • 1997 views
  • 0 likes
  • 1 in conversation