Skip to content

book on regular expressions

4 messages · S Ellison, Brian Ripley, Hadley Wickham +1 more

#
on
mention of
on the
It's not specific to R, which wraps regular expressions up in quoted
strings so has a couple of wrinkles compared to Perl, but I found the
O'Reilly " Regular Expression Pocket Reference" a good quick reference,
and rather cheaper than the whole book. It's hard to see R users needing
chapter and verse on the complete gamut of regexps.

Steve E
#
On Wed, 12 Dec 2007, S Ellison wrote:

            
One has to remember that books go out of date: for example the advent of 
UTF-8 locales has led to a number of changes in the implementations. 
The O'Reilly books have third (2006) and second (2007) editions.  (BTW the 
pocket reference is not by the same author as 'Mastering Regular 
Expressions', so in no sense is part of 'the whole book'.)

I don't think anyone has mentioned the references given on the help page 
?regexp: they are a great deal more reliable than some of the third-party 
write-ups that have been mentioned.
#
They are good technical references, but I don't think they're very
helpful for someone trying to learn regular expressions.  For example,
mastering regular expressions takes a very task based approach which
is helpful if you want to learn how to match an email address or url
correctly with a regular expression (harder than most people think),
or to match paired brackets.

Hadley
#
I recommend the following Book on regular expression matching: 

"Mastering Regular Expressions" by Jeffrey Freidl
Publisher: O'Reilly
ISBN:0-596-52812-4

Based on the my "blood, sweat and tears" of using regex type patterns
which can be very obfuscated, in addition to reading
the syntax from the above book there is some very good software
tools to test the patterns:

See these link:
http://regexlib.com/default.aspx

http://www.regular-expressions.info/

Finally in the software spirit of R and Shareware an invaluable too to
Test expressions is the software:
1-Expresso  http://www.ultrapico.com/
2-Regexdesigner.Net http://www.sellsbrothers.com/

Hope this Helps...
Neil

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of hadley wickham
Sent: Wednesday, December 12, 2007 8:28 AM
To: Prof Brian Ripley
Cc: r-help at r-project.org; S Ellison
Subject: Re: [R] book on regular expressions
They are good technical references, but I don't think they're very
helpful for someone trying to learn regular expressions.  For example,
mastering regular expressions takes a very task based approach which is
helpful if you want to learn how to match an email address or url
correctly with a regular expression (harder than most people think), or
to match paired brackets.

Hadley

--
http://had.co.nz/

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--------------------------------------------------------



This information is being sent at the recipient's reques...{{dropped:16}}