Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #17347
| From | bill <william@TechServSys.com> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | help with preg_replace |
| Date | 2017-04-13 07:57 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ocnp48$1oei$1@gioia.aioe.org> (permalink) |
I am trying to strip all non-numeric characters from a string.
This is my best guess, but it doesn't do anything to the input
string.
$number =preg_replace("[^0-9]","",$phone);
when $phone is '1a2bc34567890'
--bill
Back to comp.lang.php | Previous | Next — Next in thread | Find similar | Unroll thread
help with preg_replace bill <william@TechServSys.com> - 2017-04-13 07:57 -0400
Re: help with preg_replace tony@mountifield.org (Tony Mountifield) - 2017-04-13 12:06 +0000
Re: help with preg_replace Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-04-13 14:51 +0200
Re: help with preg_replace bill <william@TechServSys.com> - 2017-04-14 11:13 -0400
Re: help with preg_replace bill <william@TechServSys.com> - 2017-04-14 11:12 -0400
csiph-web