Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

regexp - Is it Made Easy to Learn Anywhere?

4 views
Skip to first unread message

ruffy

unread,
Jan 13, 2006, 9:50:49 AM1/13/06
to
I own 6 books in tcl/tk and although some of them deal relatively
extensively on the topic, I still find myself lacking an intimate
knowledge.

All I ask is -

IS THERE ANYWHERE A REALLY GOOD SET OF MANY EXAMPLES -
OR A SUPERIOR TUTORIAL

that covers regexp ?

PraWin

unread,
Jan 13, 2006, 10:35:25 AM1/13/06
to
There are many...
try this for regular expression...
http://www.zvon.org/other/PerlTutorial/Output/contents.html#4

-- PraWin

Glenn Jackman

unread,
Jan 13, 2006, 10:49:49 AM1/13/06
to

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

Helmut Giese

unread,
Jan 13, 2006, 11:47:49 AM1/13/06
to
On 13 Jan 2006 15:49:49 GMT, Glenn Jackman <xx...@freenet.carleton.ca>
wrote:

I second this - this book is really really good.
Helmut Giese

Volker Hetzer

unread,
Jan 13, 2006, 12:05:15 PM1/13/06
to
ruffy schrieb:

> I own 6 books in tcl/tk and although some of them deal relatively
> extensively on the topic, I still find myself lacking an intimate
> knowledge.
Start to use vi on a daily basis.

> 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

Victor Wagner

unread,
Jan 13, 2006, 12:30:24 PM1/13/06
to

Have you tried "Mastering Regular expression" from O'Reilly?

George Peter Staplin

unread,
Jan 13, 2006, 12:46:14 PM1/13/06
to

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.

Uwe Klein

unread,
Jan 13, 2006, 12:42:05 PM1/13/06
to
There is a nice gui tool to get experience with regexp:
http://wiki.tcl.tk/11175

uwe

Robert Hicks

unread,
Jan 13, 2006, 1:20:00 PM1/13/06
to
Remember: If you are looking at Perl regex examples that a word
boundary in Perl is \b but in Tcl it is a \y. I think...I am pretty
sure.

Robert

Mark Smithfield

unread,
Jan 13, 2006, 3:35:36 PM1/13/06
to

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.

bill...@alum.mit.edu

unread,
Jan 13, 2006, 7:02:03 PM1/13/06
to
The best extended introduction to regular expressions that I have seen
is Java Regular Expressions by Mehran Habibi
(http://www.amazon.com/gp/product/1590591070/104-7946716-4425542?v=glance&n=283155).
As the title indicates it is about Java, but the regular expressions
themselves are very similar and if you don't know Java you don't miss
much by skipping the programs. The exposition of the various components
of regular expressions is very clear.

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.

0 new messages