[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to search a whole word in emacs?
From: |
Xah Lee |
Subject: |
Re: How to search a whole word in emacs? |
Date: |
Fri, 23 Nov 2007 00:26:15 -0800 (PST) |
User-agent: |
G2/1.0 |
David Combs wrote:
<<...Mastering Regular Expressions, By Jeffrey E. F. Friedl... To
convince her and others to get it, how about some comments from those
who've got the book?>>
I read it in its entirety in 1999. (first edition)
I think it is a excellent book. However, i don't think it as a
practical, necessary, book, for average professional programers who
works with text a lot (such as web app developers and sys admins).
Because:
* in my extensive use of regexes, daily, since about 1998 working in
the web application industry and sys admin, i only need to use
advanced regex maybe once or twice a year.
* most complex regexes needs, are more practical to be implemented by
breaking down into 2 patterns to test on (as opposed to a single
complex regex).
* when you need advanced regexes, the regex very quickly cannot handle
the job. You need either to break it into several regexes with nested
if statements, or you need a parser.
in the above, by "advanced regexes" i mean non-grouping constructs of
the form (?...), boundary anchors, nested patterns... etc.
-------------------
related articles i've wrote:
* Pyhton Regex Documentation: String Pattern Matching (complete
rewrite of python's re module doc.)
http://xahlee.org/perl-python/python_re-write/lib/module-re.html
* Simple intro to emacs's regex
http://xahlee.org/emacs/emacs_regex.html
* Emacs Lisp regex doc
http://xahlee.org/elisp/Regular-Expressions.html
Xah
xah@xahlee.org
\xAD\xF4 http://xahlee.org/
> To convince her and others to get it, how about
> some comments from those who've got the book?
On Nov 22, 4:44 pm, dkco...@panix.com (David Combs) wrote:
> Amy Templeton <amy.g.temple...@gmail.com> wrote:
> ...
>
>
>
> >For more information, the section in the Info system on regexps is useful.
>
> >Amy
>
> For *VASTLY* more information, plus examples galore, plus explanations,
> etc, don't even think of using regexps without first acquiring the book
> (well, "bible"):
>
> Mastering Regular Expressions, 2nd Edition
> By [54]Jeffrey E. F. Friedl
> 2nd Edition July 2002
> 0-596-00289-0, Order Number: 2890
> 484 pages, $39.95 US $61.95 CA #28.50 UK
>
> Much cheaper (eg 40% off) atwww.bookpool.com.
>
> This book is the regexp-bible for the planet -- covers
> emacs, perl, php, egrep, java, you name it.
>
> Scan through the book, and you won't understand how you
> thought you knew what you were doing before you got the book.
>
> To convince her and others to get it, how about
> some comments from those who've got the book?
>
> THANKS!
>
> David