Page 1 of 2 12 Last
  • Jump to page:
    #1
  1. Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2001
    Location
    Right now? On my chair.
    Posts
    1,795
    Rep Power
    254

    Regex Resources thread


    As said...

    Other forums on here have resources thread so why not put one here? Thought I'd just start this little thang up...I'll start us off

    http://www.regular-expressions.info
    Last edited by ishnid; August 20th, 2008 at 05:47 AM. Reason: Linkification
    Use markup the semantic way. You wouldn't want your dog answering the phone for you, would you?
    HTML Validator || CSS Validator -- HTML / CSS Main forums. JavaScript and PHP...maybe
    Bones: HTML; Skin: CSS; Muscle: JavaScript; Brains: PHP; Memory: MySQL
  2. #2
  3. Permanently Banned
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2006
    Location
    In a whale
    Posts
    4,147
    Rep Power
    0
    The Jack-Daniels AddedBytes regex cheat sheet.

    If used correctly, that cheat sheet is all of the resources you will need. However, actually learning regex would be better

    Comments on this post

    • giftiger_wunsch agrees
    • ManiacDan agrees : No more jack daniels? NOOOOO! Also, nice new avatar.
  4. #3
  5. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,874
    Rep Power
    6351
    I love the RegExp PowerToy for beginners, it really helps you see how the parsing is done. There's also a programmed called "RegExp Buddy" I think, but it's not freeware.

    -Dan
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  6. #4
  7. Expert Debugger
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Apr 2006
    Location
    Dev Shed Forums (-_^)v
    Posts
    1,022
    Rep Power
    1302
  8. #5
  9. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Mar 2006
    Location
    Hindustan
    Posts
    1,121
    Rep Power
    1309
  10. #6
  11. kill 9, $$;
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2001
    Location
    Shanghai, An tSín
    Posts
    6,897
    Rep Power
    3886
    Thread stickied.

    Regexp documentation for Perl:
    perlre - Regexp documentation
    perlretut - Regexp tutorial

    Regexp resources for Java are mostly contained in the Javadoc for the Pattern class
    There's also a Java Regex Tutorial available.

    Other languages:

    Comments on this post

    • aitken325i agrees
    Last edited by ishnid; August 20th, 2008 at 05:46 AM.
  12. #7
  13. Prisoner of the Sun

    Join Date
    Jul 2004
    Location
    The Mews At Windsor Heights
    Posts
    5,309
    Rep Power
    2351
    PHP PCRE Pattern Syntax [PHPNET="pcre.pattern.syntax.differences"]Differences from Perl[/PHPNET]

    PHP [PHPNET="book.pcre"]Regular Expressions (Perl-compatible) TOC[/PHPNET]
    .
    :: My blip.fm tunes :: Web Design Feeds :: Web Dev Feeds :: CheatSheets :: PHP :: MySQL :: 13 Moon FB App.

    "All matter is merely energy condensed to a slow vibration. We are all one consciousness experiencing itself - subjectively. There is no such thing as death, life is only a dream. We are the imaginations of ourselves."
    - Bill Hicks


    "Truth is hidden in the subtle nature of the heart of everything, although it is invisible. One cannot see it from inside and neither from the surface. One can only live and experience it."
    - Heart Sutra
  14. #8
  15. No Profile Picture
    I haz teh codez!
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2003
    Posts
    2,549
    Rep Power
    2337
    Software (Offline)
    Windows-based Regex Tester/Builder: The Regex Coach
    Windows-based .NET-specific Regex Tester/Builder: RegEx Designer
    Windows-based .NET-specific Regex Tester/Builder: Expresso
    Windows-based .NET-specific Regex Tester/Builder: The Regulator
    Windows-based .NET-specific Regex Tester/Builder:RegexDesigner.NET
    Visual Studio 2005 RegEx Visualizer (plug-in): Regex Kit
    OS X Dashboard Widget Regex Tester/Builder: RegexToolbox

    Online Testers
    Rex V
    A Better .NET Regular Expression Tester

    References
    RegexAdvice
    Regular Expressions in .NET
    RegexLib.com
    Regular Expressions User Guide

    Tutorials
    Nice video tutorial
    From Text Processing in Python
    Last edited by ptr2void; August 20th, 2008 at 09:07 PM.
  16. #9
  17. Prisoner of the Sun

    Join Date
    Jul 2004
    Location
    The Mews At Windsor Heights
    Posts
    5,309
    Rep Power
    2351
    .
    :: My blip.fm tunes :: Web Design Feeds :: Web Dev Feeds :: CheatSheets :: PHP :: MySQL :: 13 Moon FB App.

    "All matter is merely energy condensed to a slow vibration. We are all one consciousness experiencing itself - subjectively. There is no such thing as death, life is only a dream. We are the imaginations of ourselves."
    - Bill Hicks


    "Truth is hidden in the subtle nature of the heart of everything, although it is invisible. One cannot see it from inside and neither from the surface. One can only live and experience it."
    - Heart Sutra
  18. #10
  19. kill 9, $$;
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2001
    Location
    Shanghai, An tSín
    Posts
    6,897
    Rep Power
    3886
    Originally Posted by b3n
    An interesting link with good explanations. I'd have reservations about their email regexp though, as it disallows some valid characters.

    Comments on this post

    • ManiacDan agrees : Nobody ever gets email right
  20. #11
  21. Autodidact
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2008
    Location
    Canada
    Posts
    741
    Rep Power
    833
    Two JavaScript-oriented regular expression resources:


    1) Just published today: http://net.tutsplus.com/tutorials/ja...r-expressions/

    2) http://www.javascriptkit.com/javatutors/redev2.shtml
    Soldiers, from the height of these pyramids forty centuries look down upon you.
    ▪ Napoleon, on the eve of the Battle of the Pyramids
  22. #12
  23. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2010
    Location
    Norcross, GA
    Posts
    8
    Rep Power
    0

    Smile Regex Storm


    If you're working with regular expressions in .NET, may I suggest:

    - Online .NET regex tester
    - Online .NET regex reference

    And yes, Regex Storm is my site.
  24. #13
  25. Moderator Emeritus
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2002
    Location
    Austin, TX
    Posts
    7,186
    Rep Power
    2265

    RegexPal


    RegexPal saves my life on a daily basis.

    RegexPal.com
    DrGroove, Devshed Moderator | New to Devshed? Read the User Guide | Connect with me on LinkedIn
  26. #14
  27. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,874
    Rep Power
    6351
    This set of Perl one-liners is fascinating and useful. Many of them are not purely regex based, but there are still good things in there.

    -Dan
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  28. #15
  29. Turn left at the third duck
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Location
    Nelson, NZ
    Posts
    112
    Rep Power
    93
    May I ask what resources you'd recommend for learning more?
    Second time I get this question this week, so to save fingers I thought I'd consolidate my answer on this thread.
    Much of what was said above is still true, but resources change and tastes vary, so here is my take.

    A. Online Resources

    1. Starting out: Jan's tutorial is a great place to start. Jan is the author of beautiful regex software (see section B) and a regex book (see section C). He knows his subject.

    2. Learning more: Once you know the very basics, in my view, this Regex Tutorial is the best place to go for both basic and advanced syntax. I wrote it, so I am biased. Judge for yourself. The page is huge and has a different approach. Instead of repeating the regex ABC you will find all over the blogosphere, this tutorial tries to cut diagonally, going to the questions you ask yourself when crafting expressions. For instance, there is a whole section just to disambiguate the many forms of (? syntax. A section about whether to capture or to match. About the various contexts where regex will be useful. About conditionals. Etc.
    There is also a second tutorial dedicated to a little-documented feature of PHP regex: Recursive Regex.

    3. Grand Master: the PCRE manual. No, I don't mean the PHP manual's section on PCRE, although that document is often helpful if you code in PHP. I mean the manual to the PCRE engine, a manual written by Philip Hazel, the creator of PCRE. It goes into the engine to a level of detail that PHP regex fans will love. Others will find it over the top.

    B. Tools

    For me, there is only one tool: RegexBuddy. RB, as this tool is known by its fans, is an all-in-one expression crafter and debugger written by Jan Goyvaerts, the author of the tutorial mentioned in section A.1. Here is an automatically updated link to the latest RegexBuddy demo.

    RB "understands" many flavors of regex: PCRE, Java, Python, etc. At the simplest level, it's a three-box interface. In one box, you craft your expression. In the second box, you paste your test strings. In the third box, you automatically see the matches and captures. There is a "Use" function that adapts your regex to the functions of your programming language: VB.Net, PHP, Java etc. And many other powerful functions.

    RegexBuddy is powerful, but you have to set it up right, and the power doesn't jump at you when you first install it, as the interface looks innocently simple. See my quick guide to RegexBuddy for set-up tips and a tour of the interface.

    C. Books

    O'Reilly has three regex books. I like two of them: Jan's cookbook, and Jeffrey's Mastering Regex book. If you pick just one, I would recommend Jeffrey's, though it is short on certain topics. I have tried hard to plug the holes in both of these books in my regex tutorial---see section A.2 above on this thread.

    The bottom line is that to learn something, you want to go at it from different directions, so I would highly recommend picking up at least one of these books.
    I don't want to repeat myself, so for more information about these regex books (and others that I don't recommend), please see my review of Regex books.

    D. Practice

    You know it, practice makes perfect. You can read and read, but until you put your fingers to the keyboard, your knowledge of regex will be secondhand. Two places to practice:

    1. Your own code. This goes without saying.

    2. The DevShed regex forum! Your code will probably not expose you to all the aspects of regex in a short period of time. But the posts on this forum will. And there are many experienced regex practitioners here from whom you can pick up things that may not jump at you right away---this happens to me, and I love it. We all learn from one another.

    Okay, folks... I could go on, but if you use the resources mentioned on this post, you'll be busy for quite a while. By that point, any other resource I could mention at this stage will be (for 90% or more) a repetition of things you already know.

    Wishing you lots of fun you your regex journey,

    Smiles,

    -Andy
Page 1 of 2 12 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo