Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- strtolower() and back again


sugarkane - 5:23 pm on Feb 27, 2002 (gmt 0)


This is a bit of a kludge (and untested) but you could find all URLs with a regular expression, use strtolower() and then reinsert the original URLs with another couple of regular expressions, eg:

[perl]
preg_match_all(" http.*? ", $string, $upper_case_matches);
$newstring=strtolower($string);
preg_match_all(" http.*? ", $string, $lower_case_matches);
preg_replace($lower_case_matches, $upper_case_matches, $newstring);
[/perl]

As I say, that's untested but might fire off a few ideas for you...


Thread source:: http://www.webmasterworld.com/php/383.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com