Hirameck

05-06-2004, 08:15 PM

Hi!

You guys have replied to my question perfectly.

I need to learn regular expressions.

Can you recommend a dedicated ;) tutorial for beginners and advanced.

I would appreciate if you could help me.

THANKS

Philip M

05-06-2004, 08:27 PM

I found the tutorials at

http://www.javascriptkit.com/javatutors/re.shtml

http://www.javascriptkit.com/javatutors/redev.shtml

extremely lucid and helpful. As always a little practice will help to gain an understanding. I don't think that regular expressions are as impentetrable as is sometimes suggested.

I am not sure why "regular expressions" are so called. Probably something from the dark ages! "Tools for Pattern Matching" seems to me a more descriptive title.

"Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems." — Jamie Zawinski.

liorean

05-06-2004, 10:27 PM

The name 'regular expression' comes from mathematics. To use something Terry Pratchett might have called "lies to programmers" (read The Science of Discworld if you don't understand what I mean), you might call regular expressions a set of constructs equal to a finite number of characters or items and nonrecursive operations to make on them, that can describe any regular language. So, what is a regular language, then? Well, according to wikipedia (http://en.wikipedia.org/wiki/Regular_language) it is "a possibly infinite set of finite sequences of symbols from a finite alphabet".

Really, you probably don't want to read too deep into that. Learn their syntax and their capabilities by using them, instead of delving into computation.