On Sat, Nov 29, 2008 at 20:02, Canol Gökel <[EMAIL PROTECTED]> wrote: > Hi, > > My problem is to match HTML tags with RegExp. snip
Can't be done*. You need a parser. snip > Note: Most probably there is a module for this but: > - I want to learn the logic, snip Learn to write a parser instead. This is like asking how to build a bridge for people out of toothpicks. It can be done (but I wouldn't walk on it), but it is a waste of your time. snip > - I don't use Perl in this project, > - Actually my problem is different than matching HTML tags but I choose them > to > explain my problem, easily. snip And yet you are asking a Perl list. Perhaps you would be better served by asking this question on a list for whatever language you are using? Perl's regexes are not standard. They contain many extensions that make this sort of thing easier, but since you are using some mystery language for this mystery project we cannot help you. * Not 100% true, but the amount of effort you will put into trying to get regex that matches even 80% of valid, expected HTML dwarfs the amount of time it takes to write a parser. Given the fact that high quality parsers exist already, there is no reason to waste your time. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read.