Learning Regex (Was: Is it just me, or is there a reason for it?)
Steve Lamb
grey at dmiyu.org
Sun Aug 15 04:49:56 UTC 2010
On 08/14/2010 08:16 PM, Thomas Yao wrote:
> Any good tutorials or books recommended for learning regexp?
I don't have any recommendations, no. I learned it while learning Perl
back when Perl 5 was newly minted.
What makes recommending tutorials or books for learning regex hard is,
which dialect? The concept is the same but the dialects are different.
Perl's dialect has become fairly ubiquitous with the introduction of the PCRE
libs (http://www.pcre.org/) but if you're a vim user then vim's dialect is
slightly different. On the other hand, once you wrap your brain around the
concept of regex and what it does the dialects are just that, slightly
different ways of expressing the same concept. Like soda, pop and coke all
referring to flavored carbonated beverages. :)
The best suggestion I could offer would be to find a regular expression
editor and play with it. When building regex I find that having interactive
feedback most helpful in knowing what is working, what isn't, and why.
--
Steve C. Lamb | But who can decide what they dream
PGP Key: 1FC01004 | and dream I do
-------------------------------+---------------------------------------------
More information about the ubuntu-users
mailing list