All I ask is -
IS THERE ANYWHERE A REALLY GOOD SET OF MANY EXAMPLES -
OR A SUPERIOR TUTORIAL
that covers regexp ?
-- PraWin
You will want to add the book "Mastering Regular Expressions" by Jeff
Friedl to your library. http://wiki.tcl.tk/127
--
Glenn Jackman
Ulterior Designer
I second this - this book is really really good.
Helmut Giese
> All I ask is -
>
> IS THERE ANYWHERE A REALLY GOOD SET OF MANY EXAMPLES -
> OR A SUPERIOR TUTORIAL
>
> that covers regexp ?
The O'Reilly book appears to be good, but the only thing that will
really help you is practice.
Lots of Greetings!
Volker
Have you tried "Mastering Regular expression" from O'Reilly?
I found it very useful years ago to print out the Tcl re_syntax.n manual
page, and read it very slowly, repeatedly, on one summer afternoon years
ago. It also takes practice to really become good with regular
expressions.
I find that it's useful to re-read other things many times in general.
Somehow the picture in my mind forms differently after getting more
context in later paragraphs, and revisiting my earlier context.
Regards,
George
P.S. Regular expressions are not the solution to everything. Sometimes
a parser written in Tcl works better than regular expressions.
Robert
If you want a really clear explanation of regex (as well as a great
testbed) open up vim.
Vim has a comprehensive implementation and great help files. It also
uses the expressions internally and makes a great way to test yourself
as you go.
Inside vim, certain characters need to be escaped that do not need to
be escaped in tcl expressions. But once you "grok" regex this is a
small matter. And since regex syntax varies from one env to another
slightly anyway, this is just part of learning regex.
A number of people have recommended the book Mastering Regular
Expressions. It is a useful book, but my feeling is that it is most
useful when you need to optimize regular expressions or concern
yourself with implementation issues. As a tutorial on how to use
regular expressions I think that the Habibi book is clearer and less
intimidating.
There are also quite a few tools for exploring regular expressions. My
own (in Tcl) is Redet and has a home page at:
http://www.billposer.org/Software/redet.html. I maintain a list of
regular expression and pattern matching tools that you might find
helpful at:
http://billposer.org/Linguistics/Computation/Resources.html#patterns.