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.
この形式の変数が複数回出現するテキストがあります。
Example text will %%include%% these %%parameters%%
私はこれを使用しようとしています:
preg_match('/%%[\s\S]*?%%/i',$output, $matches);
しかし、何らかの理由で最初の一致しか得られません。何かアイデアはありますか?
複数の一致が必要なため、preg_match_allを使用します。