If you want to open every file in that directory (you know they are all xls files) then you are done and do not need to worry about regex. If you only want to open files that start with 'my file' and end in '.xls' then you could make sure the file matches your criteria by adding an if statement inside your for loop, similar to this.
*Untested Code*
// Read all the file names
files = Files In Directory( "C:\Users\MyUserName\Documents\My Data\" );
X = N Items( files );
Y = "C:\Users\MyUserName\Documents\My Data\";
dt = New Table( "My data file" );
For( i = 1, i < X, i++,
if( !is missing( regex( files[i], "my file.*\.xls", "\0" , IGNORECASE ) ),
//open jmp files for each xls files.
dt1 = Open(
Y || files[i],
Worksheets( "my xls worksheet" ),
Use for all sheets( 0 ),
Concatenate Worksheets( 0 ),
Create Concatenation Column( 0 ),
Worksheet Settings(
1,
Has Column Headers( 0 ),
Number of Rows in Headers( 1 ),
Headers Start on Row( 1 ),
Data Starts on Row( 1 ),
Data Starts on Column( 1 ),
Data Ends on Row( 0 ),
Data Ends on Column( 0 ),
Replicated Spanned Rows( 1 ),
Suppress Hidden Rows( 1 ),
Suppress Hidden Columns( 1 ),
Suppress Empty Columns( 1 ),
Treat as Hierarchy( 0 )
)
);
dt1 << Set Name( files[i] );
//I concatenated all the files in one jmp file and close it each time.
dt << Concatenate( Data Table( dt1 ), "Append to first table" );
Close( dt1 );
);
);