Jump to content

[SOLVED] Question about Regular Expressions


All4172

Recommended Posts

What I'm wanting to do is a statement like:

 

$file = "/path/www/mydir/3429438.php";

if ($file == "/path/www/mydir/"){
$file = "/path/www/NEWmydir/3429438.php;}

 

Quesiton is what regular expression in the if statement so it'll search /[0-9].php and how to take that filename and apend it on the new $file if the instance exists.  Ideas?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.