开发者

What is the equivalent of Python's "findAll" function in PHP?

re.findall(r'(\b[a-zA-Z][a-zA-Z0-9-]*)开发者_C百科(?=\.com\b)', DATA)

how would this line be in PHP?


I think you're looking for preg_match_all.


preg_match_all('/(\b[a-zA-Z][a-zA-Z0-9-]*)(?=.com\b)/',$data,$matches);


You might want to check out http://php.net/preg_match_all

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜