[英]In PHP i have used the logic to find the digits in a number, but i get a default output which is “325” instead of “4” for four digit number
[英]how to find a number phrase in php which at least have 2 digit
我嘗試使用rss代碼,我想獲取rss代碼並在其中找到一個數字短語,這是標記:
bokk 1 is there 23453
shot 3 ao adfsdf 348943
aadd 4 asdis 4321334
adfie 9 aioe 938
如何定義一個模式來推送具有php語言數組中的數字的數字?
我認為eregi()函數可以使用,但不知道如何使用,更多解釋是,第一行具有5位數字(23453),第二行具有6位數字(348943),依此類推...如何將這些數字保存在至少有2位數字且數字位數不受限制的數組中,
您可以使用正則表達式:
preg_match_all("/([0-9]{2,})/", $string, $match);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.