Off-Topic :  K-Meleon Web Browser Forum
All which isn't K-Meleon related. 
Regular expressions driving my head around my neck.
Posted by: Carlos
Date: March 26, 2010 02:21AM

I hate myself, I'm a beginner javascript programmer (actually less than that) and I've been surfing through hell and back trying to get regular expressions in my head, but it's quite a challenge.

If anybody here could help me with a particular regular expression to detect a happy face I would be eternally grateful.

yes, this: "smiling smiley"

I only have come up with this:

/^[:][)]$/

which is nothing really, because it only detects it at the first position in a string.

I want it to detect every happy face in a string of characters individually to replace them with and image of a real happy face gif.

Options: ReplyQuote
Re: Regular expressions driving my head around my neck.
Posted by: Carlos
Date: March 26, 2010 02:28AM

Nevermind is this:

/[:][)]/g

All good times for now.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.