Good regex tutorial

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Good regex tutorial

Post by Luke »

Does anybody know where I can find a good in-depth and retard-safe regex tutorial? I have been putting off learning it for quite some time & it's about time I learn.
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

and the first two threads here:

viewforum.php?f=38

you really should invest a little more time looking :?
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

wow... I'm sorry I never even noticed that regex section before. Thank you very much! lol you are right I should look a little harder.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

The Ninja Space Goat wrote:wow... I'm sorry I never even noticed that regex section before. Thank you very much!
:cry:
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

d11wtq wrote:
The Ninja Space Goat wrote:wow... I'm sorry I never even noticed that regex section before. Thank you very much!
:cry:
Hey man...I found your articles...

Excellent resource... :)
User avatar
Bill H
DevNet Resident
Posts: 1136
Joined: Sat Jun 01, 2002 10:16 am
Location: San Diego CA
Contact:

Post by Bill H »

Does anybody know where I can find a good in-depth and retard-safe regex tutorial?
IMHO there is no such thing. I have boundless admiration for people who understand and use regex.

I am a pretty good programmer. Good enough, at least, to have been making my living at it for many years. I program in Fortran, COBOL, Pascal, BASIC, C, C++, Assembler, SQL, VB (yecch), Visual C++, ASP, PHP and for the Web. So it is unlikely that I am dumb. I learn new things every day, so I am no towering mountain of knowledge, but I would not be where I am if I were stupid.

But when I read even the most elementary discussion of regex I turn stupid. My IQ drops to about that of a relatively successful toadstool. It's some kind of mental block, I guess. I read the first paragraph about three times and think that, while it certainly looks like English, it doesn't comprehend like English. Maybe I suddenly don't understand English, I think, but then my newspaper reads okay so it's not that.

People on this forum have been most helpful, but my ignorance seems to be invincible. It's like a suit of armor that is seemingly able to repel not only slings and arrows, but RPG's, TOW's, and 8mm howitzers.

Fortunately, I haven't come across an instance where regex was essential that I wasn't able to get somebody else to crib it for me. I will, however, never give up. I will probably insist that my wife bury me with a stinking regex tutorial.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Bill H wrote:
Does anybody know where I can find a good in-depth and retard-safe regex tutorial?
IMHO there is no such thing. I have boundless admiration for people who understand and use regex.

I am a pretty good programmer. Good enough, at least, to have been making my living at it for many years. I program in Fortran, COBOL, Pascal, BASIC, C, C++, Assembler, SQL, VB (yecch), Visual C++, ASP, PHP and for the Web. So it is unlikely that I am dumb. I learn new things every day, so I am no towering mountain of knowledge, but I would not be where I am if I were stupid.

But when I read even the most elementary discussion of regex I turn stupid. My IQ drops to about that of a relatively successful toadstool. It's some kind of mental block, I guess. I read the first paragraph about three times and think that, while it certainly looks like English, it doesn't comprehend like English. Maybe I suddenly don't understand English, I think, but then my newspaper reads okay so it's not that.

People on this forum have been most helpful, but my ignorance seems to be invincible. It's like a suit of armor that is seemingly able to repel not only slings and arrows, but RPG's, TOW's, and 8mm howitzers.

Fortunately, I haven't come across an instance where regex was essential that I wasn't able to get somebody else to crib it for me. I will, however, never give up. I will probably insist that my wife bury me with a stinking regex tutorial.
Admittedly it's something that many (good) developers stumble at. Reading tutorials alone will probably not help... you really do have to just sit down and keep writing patterns and matching them to strings. Experimentation really counts for a lot when you're learning regex.

It really is one of those situations where "practise makes perfect" ;)
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

d11wtq wrote:Admittedly it's something that many (good) developers stumble at. Reading tutorials alone will probably not help... you really do have to just sit down and keep writing patterns and matching them to strings. Experimentation really counts for a lot when you're learning regex.

It really is one of those situations where "practise makes perfect" ;)
Not true d11... what you really need is someone like you to walk you through it :D

I'm by no means a regex master, but I can get by with 95% of the issues I have now thanks to the one on one help that you provided me. Maybe that's just my learning style. Or more specifically, that was the learning style required for me to understand *somewhat* regex. I"m forever grateful.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Burrito wrote:
d11wtq wrote:Admittedly it's something that many (good) developers stumble at. Reading tutorials alone will probably not help... you really do have to just sit down and keep writing patterns and matching them to strings. Experimentation really counts for a lot when you're learning regex.

It really is one of those situations where "practise makes perfect" ;)
Not true d11... what you really need is someone like you to walk you through it :D

I'm by no means a regex master, but I can get by with 95% of the issues I have now thanks to the one on one help that you provided me. Maybe that's just my learning style. Or more specifically, that was the learning style required for me to understand *somewhat* regex. I"m forever grateful.
Thanks :D

Sshhhh.... they'll all want one-on-one tuition soon :P
User avatar
Bill H
DevNet Resident
Posts: 1136
Joined: Sat Jun 01, 2002 10:16 am
Location: San Diego CA
Contact:

Post by Bill H »

..sit down and keep writing patterns and matching them to strings.
What? (He screamed.) The only part of that which I understood is "sit down." Finally some part of regex that I understand -- I do know how to sit down. Progress at last. I'm going to go in the living room where the football game is about to start and practice sitting down.

I may eat some potato chips. I know how to do that too. In fact, I have no small expertise at it.
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

Bill H wrote:What? (He screamed.) The only part of that which I understood is "sit down." Finally some part of regex that I understand -- I do know how to sit down. Progress at last. I'm going to go in the living room where the football game is about to start and practice sitting down.

I may eat some potato chips. I know how to do that too. In fact, I have no small expertise at it.
TAMAVGD :lol:
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

Burrito wrote:
Bill H wrote:What? (He screamed.) The only part of that which I understood is "sit down." Finally some part of regex that I understand -- I do know how to sit down. Progress at last. I'm going to go in the living room where the football game is about to start and practice sitting down.

I may eat some potato chips. I know how to do that too. In fact, I have no small expertise at it.
TAMAVGD :lol:

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

Post by John Cartwright »

Not all of us know aolbonics :?
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

That was burritobonics...
Post Reply