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.
re.findall(r'(\b[a-zA-Z][a-zA-Z0-9-]*)(?=\.com\b)', DATA)
这条线在 PHP 中的表现如何?
我想你正在寻找preg_match_all.
preg_match_all
preg_match_all('/(\b[a-zA-Z][a-zA-Z0-9-]*)(?=.com\b)/',$data,$matches);
您可能想查看http://php.net/preg_match_all