You are here: Regular expression help « PHP « IT news, forums, messages
Regular expression help

Posted by David Christensen on 08/02/05 19:50

I just plain suck at regex, so I was hoping to get some hints from you
regex experts out there. I'm sure it's been done a thousand times, but
I can't seem to find what I'm looking for with a simple google search:

$phone could be "1234567890" OR
$phone could be "123-456-7890" OR
$phone could be "(123) 456 7890 OR
$phone could have other unexpected characters in it, even control
characters.

So what I'm desiring to do is run some type of regex on $phone and only
return the integers and assign the cleaned string back to $phone. I
thought I knew how to do this, but it's not working.

Thanks for your guidance.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация