Thread Perl regex Fehler (19 answers)
Opened by dax42 at 2004-07-09 12:20

renee
 2004-07-09 13:13
#84083 #84083
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Code: (dl )
1
2
3
4
5
6
7
8
9
10
#! /usr/bin/perl

my $string = qq~<A HREF="/pub/databases/transfac/doc/gene1.html#BS" target="_new">BS</A> -202 -135 <A HREF="/cgi-bin/pub/databases/transfac/getTF.cgi?AC=R00929">R00929</A>; HS$IFNB_14.
<A HREF="/pub/databases/transfac/doc/gene1.html#BS" target="_new">BS</A> -167 -94 <A HREF="/cgi-bin/pub/databases/transfac/getTF.cgi?AC=R00916">R00916</A>; HS$IFNB_01; Binding factors: R2 <A HREF="/cgi-bin/pub/databases/transfac/getTF.cgi?AC=T00712">T00712</A>.
<A HREF="/pub/databases/transfac/doc/gene1.html#BS" target="_new">BS</A> -100 -61 <A HREF="/cgi-bin/pub/databases/transfac/getTF.cgi?AC=R00917">R00917</A>; HS$IFNB_02; Binding factors: IRF1 <A HREF="/cgi-bin/pub/databases/transfac/getTF.cgi?AC=T00422">T00422</A>, IRF-2
<A HREF="/pub/databases/transfac/doc/gene1.html#BS" target="_new">BS</A> <A HREF="/cgi-bin/pub/databases/transfac/getTF.cgi?AC=T00425">T00425</A>.>.~;

my @infos = $string =~ /<a[^>]+>([RT][0-9]+)<\/a>/ig;

print $_,"\n" for(@infos);
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread Perl regex Fehler