By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,998 Members | 2,773 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,998 IT Pros & Developers. It's quick & easy.

Regular expression

P: n/a
Hello everybody,
I have problem with regular expression.
I want "code" telephon number and I have two types number:
1) [xx] [xxx xxx xxx] or
2) [xx] ([xx] or [xxx]) [xxx xx xx]
where x - is digital

Maybe someone know where is simple description regular expression - for
complitly beginner.

Thx
Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
The best i can come up with is:
\[\d{2}\] (\[\d{3} \d{3} \d{3}\]|\[\d{2,3}\] \[\d{3} \d{2} \d{2}\])

which could certainly be abbreviated...but should work as is...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"PawelR" <pa************@poczta.onet.pl> wrote in message
news:eB**************@tk2msftngp13.phx.gbl...
Hello everybody,
I have problem with regular expression.
I want "code" telephon number and I have two types number:
1) [xx] [xxx xxx xxx] or
2) [xx] ([xx] or [xxx]) [xxx xx xx]
where x - is digital

Maybe someone know where is simple description regular expression - for
complitly beginner.

Thx

Nov 19 '05 #2

P: n/a
Here is everything you ever needed or wanted to know about Regular
Expressions:

http://msdn.microsoft.com/library/de...xpressions.asp

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"PawelR" <pa************@poczta.onet.pl> wrote in message
news:eB**************@tk2msftngp13.phx.gbl...
Hello everybody,
I have problem with regular expression.
I want "code" telephon number and I have two types number:
1) [xx] [xxx xxx xxx] or
2) [xx] ([xx] or [xxx]) [xxx xx xx]
where x - is digital

Maybe someone know where is simple description regular expression - for
complitly beginner.

Thx

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.