I have created a reg expression to find all files in a directory whose file name starts with “installation” and has 6 numbers after that.
What I am looking to do is get a list of files name beginning with “installation” with only 6 numbers after it. For instance, right now I have six files (test files):
installation.php
installation000001.php
installation000002.php
installation000003-sweep.php
installation000004.php
installation-sweep.php
the expression that I am using with php is /^installation([0-9]{6})/ which pulls:
installation000001.php
installation000002.php
installation000003-sweep.php
installation000004.php
I only want to pull 1, 2 and 4 (not installation000003-sweep.php). Also, how can I start from 000002 that would only pull:
installation000002.php
installation000004.php
?
If you only want the ones with numbers then .php:
Combine it with starting at 2 you can just do: