Quoting Max Noel <[EMAIL PROTECTED]>: > (Also, note that however simple they may seem, one can never > completely master regular expressions. There are entire books > dedicated to the things, and when properly used, they're the most > powerful text processing tool available for any language. In other > words, try to remember what you'll learn about them: they're very > useful.)
At the risk of being pedantic --- This is not actually true. There are things you can't do with regular expressions. The normal example is bracket counting: If I give you a string like '(1+(2-4/(3+8)*(5+9)))-(8+1)', can you write me a regex which will produce matches for only the chucks defined by the brackets? (in this case, the answer is this list of substrings: ['(1+(2-4/(3+8)*(5+9)))', '(2-4/(3+8)*(5+9))', '(3+8)', '(5+9)', '(8+1)'] ) -- John. _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
