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.
PHPで使用com.company.appnameするファイル名のようなバンドル識別子をキャッチする方法を考えています。Great.app.ios9.1-com.company.appname.super-ultra.ipapreg_match()
com.company.appname
Great.app.ios9.1-com.company.appname.super-ultra.ipa
preg_match()
ありがとう
- の隣にあるドット区切りの単語 ( 3 番目のドットまで) をつかむだけです。
$match = preg_match('~-\K(?:[^.]*\.){2}[^.]*~', $str);
デモ