Chas. Owens <chas.owens <at> gmail.com> writes:

> 
> On Sat, Nov 29, 2008 at 20:02, Canol Gökel <canol <at> canol.info> wrote:

> Can't be done*.  You need a parser.

snip

It can be done.

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 want to parse a language, I want to match just "a tag". Do you thing,
for example, forum scripts do language parsing for their bbcode?

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.
> 

snip

I could ask this question to any language list which has regular expressions as
a feature. I guess parsing bbcode can be done with almost any programming
language out there and I think the logic should not be that complicated which
requires modules/extensions etc. right? Since Perl is the most powerful language
with RegExps I decided to ask this in this list. Also, should I ask what
"variables" are to Pascal list just because I use Pascal?

snip

> * 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.
> 

Who said that I want to parse the whole HTML standard? I just want to match 1
single HTML tag with no attributes or something. Just <p></p> and that's all.

Please before answering a post with judgments inside, read it carefully and try
to understand what this person is asking.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to