Regex Handling

Writing regular expressions for the Transparent Gateway and Payment Services

Overview

TokenEx's Transparent Gateway and Payment Services products utilize regular expressions for extracting merchant-specified data for tokenization and CVV association or generation of response parameters. These products handle regexes the same way: processing data returned by the regex's match or group[0]. Use the recommended tool of your choice below to build regexes for your application's use case.

To increase the specificity of a regex, utilize positive lookaheads and lookbehind operators. If attempting to use a positive lookahead that targets a key that is not a fixed length, consider chaining regexes with variations of that key via the | (or) operator.

Recommended Tools

  • .Net Regex Tester - Regex Storm is the closest representation to how our platform processes regular expressions.
  • Regexr: PCRE Engine is another favored tool, especially for sharing and troubleshooting.

Examples

Transparent Gateway

Payment Services