Pr0metheuS has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: REGEXP to match someting..
by choroba (Cardinal) on Dec 29, 2011 at 14:01 UTC
    Can you please be more specific? What do you mean by "dont work"? What code do you use, what output do you get and what output do you expect?
      ok.. in my $con i have many <cite> </cite> and my regexp match from <cite> to another </cite> and i get html code. i need regexp to match from <cite> to next </cite> no another </cite>.

        If you assume your data is well-structured, you could make the * in .* lazy:

        while($con =~/<cite>(.*?)<\/cite>/g)

        I recommend against this because using regular expressions to parse a markup language is generally a bad idea. You're better off using a CPAN module to parse it for you.