Welcome to the new regex forum.

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Welcome to the new regex forum.

Post by McGruff »

Regex was invented by evil madmen. At least it seems like that at first - soon it starts to make sense. If there was a Society for Semasiological Research, and they awarded prizes for languages which cram the most meaning into the smallest number of symbols, regex would sweep the board.

Try these links to get started and post questions or useful expressions in this forum.

http://www.regular-expressions.info/tutorial.html
http://www.evolt.org/article/rating/20/22700/index.html

And don't forget this handy tool: http://weitz.de/regex-coach/
The Monkey
Forum Contributor
Posts: 168
Joined: Tue Mar 09, 2004 9:05 am
Location: Arkansas, USA

Post by The Monkey »

Cool, this will come in very handy.

Thank you :)
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Maybe afterall it is time I dwell in the magical world of regex ;)
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

Thanks McGruff now I will have no excuse not to understand the basics of regex. No what will I be able to tell my boss? :x
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

good idea, ill be here way too much, somebody writing a small tutorial for regex noobs would be a nice way to open the board ::hint hint::
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

Great, This should make searching/finding info on various regexp much easier :)
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post by Skara »

alright! too many RE questions floating around. :P
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

Quick! Someone ask a REGEX question!!!!!



:lol:
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

How many regEx does it take to change a lightbulb? ;)



Answer:

\d
The Monkey
Forum Contributor
Posts: 168
Joined: Tue Mar 09, 2004 9:05 am
Location: Arkansas, USA

Post by The Monkey »

*Bangs head on desk*

That was awful. :P
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

The Monkey wrote:*Bangs head on desk*

That was awful. :P
heh... Must be a regex thing.... I actualy thought it was very funny (still laughing :P )
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post by Skara »

hahaha. pretty funny, man. :P
User avatar
m3mn0n
PHP Evangelist
Posts: 3547
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

User avatar
sweatje
Forum Contributor
Posts: 277
Joined: Wed Jun 29, 2005 10:04 pm
Location: Iowa, USA

Post by sweatje »

patrikG wrote:How many regEx does it take to change a lightbulb? ;)



Answer:

\d
I am pretty sure the answer is

\d(?<!0)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

sweatje wrote:
patrikG wrote:How many regEx does it take to change a lightbulb? ;)



Answer:

\d
I am pretty sure the answer is

\d(?<!0)

That's a lookbehind done wrong :P

I guess you meant a lookahead ;)

\d(?!0)

o_O d11wtq is Mr Pedantic for the rest of the day :P
Post Reply