PHP filter replacement output digital and non numeric

time:13-10-27 forum:PHP tools and code
  [code]$str = preg_replace ('/^\d / ',' ', $oldStr); [/code]
[/code]


[code]echo preg_replace ('/\D/', '','a1asd2asd3a'); [/code]
to remove non - digits in string

prev:It is hard to see that 300 thousand of J... next:Xu Zhimo, Lin Whei-yin and more than 300...
post comment
Notice



approved   What can you eat for 10 dollars? The...   Through a hundred years, take you to...   26 mountain parks all over Ji'nan   The young man insisted on 10 years' ...   Do you remember those "made in Ji'na...
rand   PHP curl function simulation browser...   PHP uses curl to simulate user landi...   MYSQL query optimization   PHP completely filters HTML, JS, CSS...   PHP extraction of Chinese characters...
ads

other

Because all the contents of this site are reproduced from other media, the intention is to provide free services to the public, but it does not mean that this site agrees with its views, and can not be responsible for the authenticity of its verification, such as the copyright unit or individual of the manuscript does not want to publish on this site, please Contact me, I will immediately remove it, thank you. Contact: atseashawk@163.com