mancroft Posted March 17, 2007 Share Posted March 17, 2007 I have a list: fred harry43986.php jayne.php diana732 james and need to sort out the strings which end .php from those that don't. What's the RegEx for that? Thanks. Quote Link to comment Share on other sites More sharing options...
fert Posted March 17, 2007 Share Posted March 17, 2007 preg_match_all("/(.*)\.php/s",$subject,$matches); Quote Link to comment Share on other sites More sharing options...
mancroft Posted March 17, 2007 Author Share Posted March 17, 2007 Thank you, fert. Quote Link to comment Share on other sites More sharing options...
paul2463 Posted March 17, 2007 Share Posted March 17, 2007 if(ereg("\.php$" , $string)) { // what to do if true } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.