Re: ereg help!
| From: | steve | Date: | Wed, 09 Jan 2008 03:05:00 +0000 |
| Subject: | Re: ereg help! | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-266949@lists.php.net to get a copy of this message | ||
On Tuesday 08 January 2008 20:30:29 Chris wrote:
>I usually use preg_* functions so here's my go:
>echo preg_replace('/\.php$/', '.com', $file);
>The '$' at the end makes sure it's a .php file and won't cause problems
>with files like xyz.php.txt .
>(otherwise I'd just use a straight str_replace).
Thanks
Guess i was just trying to over think it. Have not done much with files.
Steve