Re: [PHP] Preg_match - Find URL and convert to lower case

2006-12-01 Thread Kevin Murphy
On Dec 1, 2006, at 1:56 PM, Richard Lynch wrote: On Thu, November 30, 2006 5:04 pm, Kevin Murphy wrote: Well the problem would be then that the entire string would be lower case, and I only can have the link as lower case. Is there a way to apply strtolower into the preg_match? Why not use lo

Re: [PHP] Preg_match - Find URL and convert to lower case

2006-12-01 Thread Richard Lynch
On Thu, November 30, 2006 5:04 pm, Kevin Murphy wrote: > Well the problem would be then that the entire string would be lower > case, and I only can have the link as lower case. Is there a way to > apply strtolower into the preg_match? Why not use lower(link) in SQL to get the link out in the firs

[PHP] Re: SOLVED: [PHP] Preg_match - Find URL and convert to lower case

2006-11-30 Thread Kevin Murphy
$section_notes = preg_replace('/WWW.(.*?) /e', '"www." . strtolower("$1") . "\" target=\"_blank\">http://www."; . strtolower("$1") . ""', $section_notes); For some reason I can't get it to work if I decare those items as variables. They have to be inside the preg_replace as written. But, it

Re: [PHP] Preg_match - Find URL and convert to lower case

2006-11-30 Thread Kevin Murphy
Well the problem would be then that the entire string would be lower case, and I only can have the link as lower case. Is there a way to apply strtolower into the preg_match? -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3

Re: [PHP] Preg_match - Find URL and convert to lower case

2006-11-30 Thread Dave Goodchild
Why not use strtolower on the string after the replacements have been made? -- http://www.web-buddha.co.uk

[PHP] Preg_match - Find URL and convert to lower case

2006-11-30 Thread Kevin Murphy
I have some text that comes out of a database all in uppercase (old IBM Mainframe that only supports uppercase characters). Occasionally there are web addresses in this text and so I am trying to find them, convert them to a link, and convert them all to all lower case. Yes, I know that wil