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
精彩评论