My first regex tutorial

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

Moderator: General Moderators

Post Reply
kerouac3001
Forum Newbie
Posts: 3
Joined: Thu Jan 11, 2007 9:35 am

My first regex tutorial

Post by kerouac3001 »

Hi guys..this is my first post and i'm gonna promote a mine tutorial, so it can seem a bit "spam". If there is any problem just say it to me or edit my post.

I've written a regex tutorial for dummies and i wish to know what do you think about it :)

Here is the link to my regex tutorial.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Errors:
  • various grammatic errors
  • Email verification non-compliant
    [a-zA-z0-9_\.]+@[a-zA-Z0-9-]+\.[a-zA-Z]{0,4}
  • Phone number pattern
    [0-9]+\[0-9]+
  • denying misspelled
    "dening"
  • forward assertion
    extra Michael highlighted
Notes:
  • It may be good to use the asterisk some more.
  • I'm not sure I'd lump assertions with the question mark.
  • An example of backward assertions could prove useful to some.
kerouac3001
Forum Newbie
Posts: 3
Joined: Thu Jan 11, 2007 9:35 am

Post by kerouac3001 »

Thanks! it ll be very useful to me :D
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Looks good to me, but take on board feyd's comments to correct those mistakes ;)

One other thing I'd change "Class repetition operators" should really be called "Quantifiers" and on the same note, "?" is a quantifer {0,1} not an assertion. You can keep calling them class repetition operators if you like because it's a bit newbie-friendly, but I'd ceranly highlight the correct terminology otherwise reader will get confused when reading other topics around regular expressions.
kerouac3001
Forum Newbie
Posts: 3
Joined: Thu Jan 11, 2007 9:35 am

Post by kerouac3001 »

Tnx!

My translator is a friend (not an expert) and he had a problem to translate some technical terms :)

I'll correct the tutorial :)
Post Reply