Thread Regex Problemchen (7 answers)
Opened by Heromaster at 2003-10-08 14:24

Strat
 2003-10-09 02:20
#62140 #62140
User since
2003-08-04
5246 Artikel
ModeratorIn
[Homepage] [default_avatar]
Teste mal:
Code: (dl )
1
2
3
4
5
6
7
my $tag = 'email';
if ($string =~ s| \Q[$tag]\E (.+?) \Q[\/$tag]\E /<a href="mailto:$1">$1</a>|sigx) {
# ersetzt
}
elsif ( $string =~ s| \[\Q$tag=\E ([^]]+?)\] (.+?) \[/\Q$tag\E\] |<a href="mailto:$1">$2</a>|sigx ) {
# ersetzt 2
}
perl -le "s::*erlco'unaty.'.dk':e,y;*kn:ai;penmic;;print"
http://www.fabiani.net/

View full thread Regex Problemchen