Re: URL Parsing...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris wrote:
Richard Heyes wrote:
well if you take a string (filename) and wish to change the end of it somone then I don't think str_replace() is the correct function. what's to say a script
doesn't exist called 'my.cfm.php'?

How does this:

/\.cfm$/

take into account that?

$ in regex's means 'end of string' - so it will only match .cfm at the very end of the string.

Indeed, so how does the regex take into account ".cfm.php"? It doesn't. If it doesn't have a .cfm extension, it won't match.

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux