8 Einträge, 1 Seite |
1
2
3
4
5
6
my $tmp;
$entry =~ s/(\[email\]|\[email=(.*)\])(.*)\[\/email\](?!\[\/email\])(?{ if(!defined($2) or $2 eq '') {$tmp = $3 }else{ $tmp = $2 } })/<a href=\"mailto:$tmp\">$3<\/a>/ig;
print "Ich bin 1 $1<br>";
print "Ich bin 2 $2<br>";
print "Ich bin 3 $3<br>";
print $tmp;
])(?{ if(!defined($2) or $2 eq '') {$tmp = $3; }else{ $tmp = $2; } })
])(?{ if $2 ne '') {$tmp = $2; }else{ $tmp = $3; } })
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
}
$entry =~ s/\[email(?:\=(.+?))?\](.+)\[\/email\]/"<a href=\"mailto:\"".eval($1 ? $1 : $2)."\">".$2."<\/a>"/ige
8 Einträge, 1 Seite |