Lotus Notes FAQ Visit Our Sponsor!

Can you use regular expressions for string matching?

Look for the following formula to return true in each case.

To check if a character is alphanumeric...

@Matches(Char; "{A-z}")

To check for "a" or "b" or "c" ...

@Matches(Char; "{a-c}")

To check for all upper case alphanumeric plus the letters "a" or "b" or "c" and "d" ...

@Matches(Char; "{A-Za-d}")

To check for $321,000 or $321.000 but not $321.00 or $321,000- ...

@Matches(Dollar; "{$}{0-9}{0-9}{0-9}{,.}{0-9}{0-9}{0-9}")

To check for US long distance phone number...

  @Matches(PhoneNum; "{0-9}{0-9}{0-9}-{0-9}{0-9}{0-9}-{0-9}{0-9}{0-9}{0-9}");
  @Failure("The Phone number must be in the format \"xxx-xxx-xxxx\"")

To check for social security ...

Applies to Notes Versions: 3 4 4.5 4.6 5
Last Modified: October 31, 1998