List Info

Thread: note 61606 added to ref.regex




note 61606 added to ref.regex
user name
2006-02-07 20:19:31
I am using a regex with the same thought process in mind as
the earlier phone number. However, I have also implemented
it to allow the '1' so a number like.

1 222 222 2222 would still be valid as well (along with all
of the other combinations.

In my regex, I pull out the matches - not the exact string.
So if someone were to forget a bracket, it wouldnt matter to
the actual output as it is stripped from that match.

So, if you put in 222) 233 3454, the matches would only pull
out 1=>222, 2=>233, 3=>3454

This has been very helpful in tweaking my regex.

Thanks,
Nate
----
Server IP: 64.246.30.37
Probable Submitter: 67.36.48.23
----
Manual Page -- http://www
.php.net/manual/en/ref.regex.php
Edit        -- http://master.php.net/manage/user-notes.php?action=
edit+61606
Delete: added to the manual -- htt
p://master.php.net/manage/user-notes.php?action=delete+61606
&report=yes&reason=added+to+the+manual
Delete: bad code            -- http://master.
php.net/manage/user-notes.php?action=delete+61606&report
=yes&reason=bad+code
Delete: spam                -- http://master.php.
net/manage/user-notes.php?action=delete+61606&report=yes
&reason=spam
Delete: useless             -- http://master.p
hp.net/manage/user-notes.php?action=delete+61606&report=
yes&reason=useless
Delete: non-english         -- http://mast
er.php.net/manage/user-notes.php?action=delete+61606&rep
ort=yes&reason=non-english
Delete: already in docs     -- http://
master.php.net/manage/user-notes.php?action=delete+61606&
;report=yes&reason=already+in+docs
Delete: other reasons       -- http://master.php.net/manage/user-
notes.php?action=delete+61606&report=yes
Reject      -- http://master.php.net/manage/user-
notes.php?action=reject+61606&report=yes
Search      -- http://ma
ster.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )