PHP从第一个数字爆炸(整数) [英] PHP Explode from first number (integer)
本文介绍了PHP从第一个数字爆炸(整数)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想爆炸一些带有第一个数字(整数)的测试.这是一些话.
I want to explode some test with first number (integer) in it . Here are some words .
Avant Browser 2013 Build 110
Firefox 23.0 Beta 10
Google Chrome 29.0.1547.41 Beta
我正在尝试此操作,但无法正常工作.
i am trying this but its not working.
$in ='Avant Browser 2013 Build 110';
preg_match("/\d[^A-Za-z]+([A-Za-z\s]+)/", $in, $match);
echo $match[0];
所需的输出是:-
Avant Browser
Firefox
Google Chrome
请帮助
推荐答案
尝试此正则表达式:
^.*?(?=\d) //start lookup from linestart, get all symbols before first number occurance
这篇关于PHP从第一个数字爆炸(整数)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文