hmm, got a little question.
1. what's that \\1 and \\2? got any info on where u got that from?
2. what if it's just href="anything.html" ? i mean.. something like it got
lots of subdirectories or not.

Thanks
----- Original Message -----
From: "Mark Maggelet" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 24, 2001 1:19 AM
Subject: Re: [PHP] ereg questions


> On Thu, 24 May 2001 01:01:16 +0800, Ker Ruben Ramos
> ([EMAIL PROTECTED]) wrote:
> >How do i change all '<a href="anything/here.html">' to '<a
> >href="file.php?file=anythinghere.php">'
> >any help out there?
>
> I would go:
>
> $string = ereg_replace(
> "<a href=\"([^/]+)/(.*)\\.html\">",
> "<a href=\"file.php?file=\\1\\2.php\">",
> $string);
>
> - Mark
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to