On Wed, Mar 28, 2012 at 6:54 PM, Monnier, Gary <Gary.Monnier@xxxxxxxxx> wrote:
You can also look at
they have a phone number matching pattern of  \b\d{3}-\d{4}.

Theirs  \b\d{3}-\d{4}
Yours   \d{3}-\d{4}

Maybe all you are missing is the \b?

This came up just a couple months ago on the RPG list. What people
need to understand is that there is no single, universal regex
language. Just as Oracle, MS SQL Server, DB2, mySQL, PostgreSQL, etc.
each have their own variants and extensions of the SQL language, each
implementation of regex is potentially a little different.

In particular, not all regex implementations support \d as a shortcut
for digit. According to Scott, the regex being used by the OP should
handle POSIX basic and extended (but *not* Perl-like!) regular
expressions. See



So you should stick to [0-9] instead. Also note that most modern
implementations of regex are Perl-like, and thus random docs,
tutorials, and testers you find on the Web are likely to be Perl-like
as well. You really have to use the docs that are specifically meant
for your exact implementation of regex.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.