Skip Navigation

Regular expression test tool

You can use an online regular expression test tool to test regular expressions. Enter the data and adjust the regular expression until the mapping ID is extracted from the data.
The SQL to retrieve the current regular expression from the database is:
SELECT value FROM GLB_CONFIG_TAB where KEY_NAME = 'ALT_HTTP_CAC_REGEX
'
When the preconfigured regular expression values do not extract the correct information, modify the regular expression stored in ALT_HTTP_CAC_REGEX. The default value is:
(?<MID>\d{8,10})(?!.*\d)
Where:
  • ?<MID> is the named group MID that the middle tier code requires. The remaining regex inside the parenthesis with ?<MID> is the sub expression: \d{8,10}.
  • \d matches any decimal digit, and \d{8,10} matches any number between 8 and 10 digits.
  • (?!.*\d) matches a dot 0 or more times, a decimal digit once, and that expression is used by (?<MID>\d{8,10}) to extract numbers with 8 to 10 digits. For example:
    • 0069651550.CBP evaluates to 0069651550 (Good—Extracts between 8 and 10 digits to the left of the decimal.)
    • FIRST.LAST.MI.1233837489 evaluates to 1233837489 (Good—Extracts between 8 and 10 digits to the right of last decimal.)
    • 1234567890.CBP.11223344 evaluates to 11223344 (Good—Extracts between 8 and 10 digits of the last number.)
    • 1234567890.CBP.112233445566 evaluates to 2233445566 (Bad—Truncates digits when there are more than 10. You need to update the regex: (?<MID>\d{8,12}) will work.)
For information on .Net regular expression syntax see:
If changes are required to accommodate a different format, you have two options:
  1. Send the data found above to 
    BlackBerry AtHoc
     customer support with a request to have engineering determine the new regular expression.
  2. Determine the regular expression yourself.