ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Five Habits for Successful Regular Expressions
Subject:   more appropriately ...
Date:   2003-08-29 12:31:01
From:   anonymous2
Response to: US phone numbers

Not to take away from the main point of the article; it's an ugly practical problem I've dealt with in the past and I wanted to point out another option. Re-stated in the context of the article, please replace the appropriate line in my last post with:


if ($phone =~ m/^ # beginning of string
(\d{3})? # maybe an area code
(\d{7}) # definitely 7 digits
$ # end of string
/x) {


Krishna Sethuraman


1 to 1 of 1
  1. more appropriately ...
    2003-11-08 10:42:06  anonymous2 [View]

    • more appropriately ...
      2004-01-12 08:36:19  anonymous2 [View]

1 to 1 of 1