Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread Robert Cummings
On Sun, 2009-04-26 at 22:52 +0530, Sudheer Satyanarayana wrote: > Robert Cummings wrote: > > I was about to say the same thing *lol*. tis true though, the class > > should be "doubleQuoted" or something similar. What happens when they > > decide it should be blue? > > > > > Aren't CSS class name

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread Sudheer Satyanarayana
Robert Cummings wrote: I was about to say the same thing *lol*. tis true though, the class should be "doubleQuoted" or something similar. What happens when they decide it should be blue? Aren't CSS class names supposed to be in lower case? I would go with something like "double_quoted". spa

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread tedd
At 11:59 AM -0400 4/26/09, Robert Cummings wrote: On Sun, 2009-04-26 at 11:40 -0400, tedd wrote: > While it might not fit with the purest css, it works for me. YMMV. :-) Your thinking is flawed. Yes you could have a class called center and it does exactly that... center the text. However to m

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread Robert Cummings
On Sun, 2009-04-26 at 11:40 -0400, tedd wrote: > At 9:47 AM -0400 4/26/09, Robert Cummings wrote: > >On Sun, 2009-04-26 at 14:49 +0100, Ashley Sheridan wrote: > > > On Sun, 2009-04-26 at 09:41 -0400, tedd wrote: > > > > > ?> > > > > > > > I'd go further on that and say don't call your class 'r

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread Ashley Sheridan
On Sun, 2009-04-26 at 11:40 -0400, tedd wrote: > At 9:47 AM -0400 4/26/09, Robert Cummings wrote: > >On Sun, 2009-04-26 at 14:49 +0100, Ashley Sheridan wrote: > > > On Sun, 2009-04-26 at 09:41 -0400, tedd wrote: > > > > > ?> > > > > > > > I'd go further on that and say don't call your class 'r

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread tedd
At 9:47 AM -0400 4/26/09, Robert Cummings wrote: On Sun, 2009-04-26 at 14:49 +0100, Ashley Sheridan wrote: > On Sun, 2009-04-26 at 09:41 -0400, tedd wrote: > > > > > I'd go further on that and say don't call your class 'red', as it > doesn't do anything for semantic code, but that's just me

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread Robert Cummings
On Sun, 2009-04-26 at 14:49 +0100, Ashley Sheridan wrote: > On Sun, 2009-04-26 at 09:41 -0400, tedd wrote: > > At 1:40 PM -0400 4/25/09, Andrew Hucks wrote: > > >If I have something like $string = '"hello" there'; (the word hello is > > >in double quotes, if you can't see it), how would I output it

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread Ashley Sheridan
On Sun, 2009-04-26 at 09:41 -0400, tedd wrote: > At 1:40 PM -0400 4/25/09, Andrew Hucks wrote: > >If I have something like $string = '"hello" there'; (the word hello is > >in double quotes, if you can't see it), how would I output it as > >something like "hello" there. > > Arrggg. > > Don't use:

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread tedd
At 1:40 PM -0400 4/25/09, Andrew Hucks wrote: If I have something like $string = '"hello" there'; (the word hello is in double quotes, if you can't see it), how would I output it as something like "hello" there. Arrggg. Don't use: ""hello"" The font tag is dead and embedded styling should mov

Re: [PHP] Change color of anything in double/single quotes

2009-04-26 Thread Nitsan Bin-Nun
That's what I was just about saying, in addition try to add the HTML entities to the regular expression as well: $string = preg_replace('/(?:& #34;|")(.*?)(?:& #34;|")/', '"\\1"', $string); Also if you don't to get caught by the HTML validator you better surround the color name with double quotes

Re: [PHP] Change color of anything in double/single quotes

2009-04-25 Thread Daniel Brown
On Sat, Apr 25, 2009 at 13:50, Marc Steinert wrote: > > $string = preg_replace('/"(.*?)"/', '"\\1"', > $string); Close, but I'd also recommend dropping in a 'Us' modifier so that it is `U`ngreedy and `s`pans lines. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/

Re: [PHP] Change color of anything in double/single quotes

2009-04-25 Thread Phpster
On Apr 25, 2009, at 13:40, Andrew Hucks wrote: If I have something like $string = '"hello" there'; (the word hello is in double quotes, if you can't see it), how would I output it as something like "hello" there. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

[PHP] Change color of anything in double/single quotes

2009-04-25 Thread Andrew Hucks
If I have something like $string = '"hello" there'; (the word hello is in double quotes, if you can't see it), how would I output it as something like "hello" there. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Change color of anything in double/single quotes

2009-04-25 Thread Marc Steinert
Andrew Hucks wrote: If I have something like $string = '"hello" there'; (the word hello is in double quotes, if you can't see it), how would I output it as something like "hello" there. Try $string = preg_replace('/"(.*?)"/', '"\\1"', $string); Greetings from Germany Marc Steinert -- Sync