You can match specific numbers exactly, for example, 100, 1506, 867-5309 ('literal matching') or you can match against a template (for example, 'match any 5-digit number joined by a hyphen to a 4-digit number').
Syntax
This syntax is mandatory when specifying a character template or number template. It matches the contained template on a per character basis.
Separate multiple templates with commas:
%#<template>%,%#<template>%
This syntax is not needed for literal matching.
Matches any single letter
Matches any single digit (0-9)
Matches any single letter or digit
Matches any single punctuation character
Matches M occurrences of a character. For example, \d[3] matches any 3 digit number.
Matches M to N occurrences of a character. For example, \d[1,5] matches any number with between 1 and 5 digits
Matches any character between 'a' and 'z'. Use this syntax to limit the range of permitted character matches.
Examples
This number matches 867-5309 only; it does not match, for example, 5309, or 467-5309.
This template matches any string of 5 digits followed by 3 letters, followed by a hyphen and 5 to 7 digits. For example, 32456dfs-345661.
This template matches 7 digit telephone numbers where the first three digits are separated by a period, a dash, or a space. For example, 021-7657 or 021 7657.
This template matches any numeric string that starts with 2, 3, 4, or 5, and is followed by 11 to 13 digits. For example, 398744614630.
This template matches the number 22, followed by exactly two letters, then 1 to 4 digits, joined to punctuation, then followed by a space and the letter x, y, or z. For example, 22AB123. Z.
Copyright © 2014 CA.
All rights reserved.
|
|