Thread split at '[ ]' (13 answers)
Opened by firstday at 2013-04-24 19:20

pq
 2013-04-24 19:50
#167269 #167269
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
ggfs. ist auch CPAN:Parse::BBCode eine option für dich.

edit:
beispiel:
Code (perl): (dl )
1
2
3
4
5
6
7
use Parse::BBCode;
my $p = Parse::BBCode->new;
my $tree = $p->parse($text);
$tree->walk(bfs => sub {
    my ($tag) = @_;
    say $tag->raw_content if $tag->get_name eq "url";
});

würde dir alle links liefern, wenn es mehrere sind.
Last edited: 2013-04-24 20:12:27 +0200 (CEST)
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread split at '[ ]'