Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想解析一个带有信息的txt文件。我想要的是,要找到该字符串中的所有数字,我的意思是我想要一个子在第二个、第三个等之后返回第一个数字(与数字一样多的数字)。这可能吗?
$string = preg_replace('/\D/', ' ', $string);
$numberArray = explode(' ',$string);