ファイル名が「インストール」で始まり、その後に6つの数字があるディレクトリ内のすべてのファイルを見つけるためのreg式を作成しました。
私が探しているのは、「インストール」で始まり、その後に6つの数字しかないファイル名のリストを取得することです。たとえば、現在 6 つのファイル (テスト ファイル) があります。
installation.php
installation000001.php
installation000002.php
installation000003-sweep.php
installation000004.php
installation-sweep.php
私がphpで使用している式は、次の/^installation([0-9]{6})/
とおりです。
installation000001.php
installation000002.php
installation000003-sweep.php
installation000004.php
1、2、および 4 のみをプルしたい (installation000003-sweep.php ではない)。また、プルするだけの 000002 から開始するにはどうすればよいですか。
installation000002.php
installation000004.php
?