Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Regular expressions

by hasnainzeenwala (Novice)
on May 26, 2011 at 14:35 UTC ( #906842=perlquestion: print w/replies, xml ) Need Help??

hasnainzeenwala has asked for the wisdom of the Perl Monks concerning the following question:

Hi guys. I'm a beginner to perl and I'm on the topic of regular expression in the "Learning perl" book, but cannot grasp it can someone please give me a specific reference on it.

Replies are listed 'Best First'.
Re: Regular expressions
by rovf (Priest) on May 26, 2011 at 14:43 UTC
    If I understand your question right, you are reading "Learning Perl", but find the chapter about regular expressions too difficult, so that you can't understand it, and you are now looking for an easier introduction. Correct?

    I think a VERY easy intro can be found here: After you understood this, go back to your book and read the chapter again. This is another introduction: Though this is on about the same level than the chapter in Learning Perl, maybe it helps you to have the same subject covered in a different way.

    Ronald Fischer <>
      Thanks For a specific link i'll start reading it.
Re: Regular expressions
by toolic (Bishop) on May 26, 2011 at 14:44 UTC
Re: Regular expressions
by raybies (Chaplain) on May 26, 2011 at 15:02 UTC

    in addition to reading the book (Learning Perl is a GREAT starting book)...


    Work through the examples.

    You'll learn a million times by doing, and trying it, than you will by reading a thousand references.

Re: Regular expressions
by luis.roca (Deacon) on May 26, 2011 at 15:48 UTC
    Hi hasnainzeenwala,

    Here's a pretty good list of resources for learning Regular Expressions:
    The site itself is a good resource. I believe Jeffrey Friedl (author of Mastering Regular Expressions) started and/or is involved with the site in some way.

    Speaking of Mastering Regular Expressions, * that is definitely a book you should have. Don't worry too much about the title. The book starts off really nicely and covers a lot of ground by the time you've finished the chapters on using Regexes in Perl.

    * The other thing I would recommend is to make sure your text editor gives you the ability to do search and replace with regular expressions. (If you look in your software's documentation it may say something like: "do search and replace with grep". That's Ok, that's what you want.) Use the text editor for EVERYTHING (emails, love letters, emailed love letters, etc.) You will quickly learn how often you can and will want to use regular expressions.

    1. * I would also recommend picking up either a book on UNIX like: UNIX in a Nutshell or UNIX Power Tools as both of them have coverage of Regular Expressions appropriate for beginners. However, and everyone may not agree with me here, you can also check out sed & awk which can be argued is entirely about pattern matching (what regular expressions do).
    2. * I'd also recommend a simple regular expressions application. I use Reggy for Mac OSX but there are a few others out there like RegexBuddy.
    3. UPDATE May.26.2011: Added links to UNIX books.

      "...the adversities born of well-placed thoughts should be considered mercies rather than misfortunes." Don Quixote
      I didn't know that it was such a big topic to be written in a book, thank you. I'll use it ASAP.
Re: Regular expressions
by planetscape (Chancellor) on May 26, 2011 at 16:09 UTC
Re: Regular expressions
by bart (Canon) on May 26, 2011 at 19:48 UTC
Re: Regular expressions
by Anonymous Monk on May 26, 2011 at 14:57 UTC

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://906842]
Approved by rovf
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2023-02-08 04:24 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (40 votes). Check out past polls.