Full-text macros

The IBM® StoredIQ® full-text filter supports a set of predefined macros.

A macro is an abbreviated set of instructions that are used in common filter patterns. For example, the filter {SSN} finds any document that contains Social Security numbers.

Full-text macros have the following characteristics:
  • A macro is an alphanumeric name that is enclosed in curly braces, for example, {SSN}.
  • A macro's name is case insensitive. For example, the macro {ssn} is the same as the macro {SSN}.
  • The macro's value is replaced in the macro's full-text query. Then, the filter is parsed and run.
  • Any unrecognized macro results in a syntax error.
  • Regular expressions, that is named character classes, do not match macros. That is, a regular expression like \p{Lower} (matches any lowercase ASCII character) is not recognized as a macro.

The following macros are defined within the full-text feature of IBM StoredIQ. Each of these macros is a high-confidence macro. It means that the filter {SSN} finds any document that contains Social Security numbers with high confidence that the matches really are Social Security numbers. To find anything that might be a Social Security number, use the low-confidence macro {SSN-lc}.

Macros can be combined with any other full-text expression, such as {SSN} w/5 "John Doe".
  • {SSN}: Social Security numbers, which can include dashes and numbers
  • {USPhone}: US phone numbers, which can include dashes, dots, parentheses, numbers, and letters. This macro can filter for mnemonics like 1-800-flowers.
  • {InternetAddress}: Legal IP addresses, either as numbers or as names, which can include dots, numbers, and letters.
  • {EmailAddress}: Legal email addresses, which can include @, dots, numbers, and letters.
  • {CCAmex}: American Express credit-card numbers, which can include dashes and numbers.
  • {CCDiners}: Diners Club credit-card numbers (including enRoute credit-card numbers), which can include dashes and numbers.
  • {CCDiscover}: Discover credit-card numbers, which can include dashes and numbers.
  • {CCJCB}: JCB credit-card numbers, which can include dashes and numbers.
  • {CCMC}: MasterCard credit-card numbers, which can include dashes and numbers.
  • {CCVisa}: Visa credit-card numbers, which can include dashes and numbers.
  • {CreditCard}: Any credit-card number from the listed providers.