18.216.190.167 |    

Navigation

Google Advertisement

Die Funktion code2html() wandelt Platzhalter in HTML Code um (Stichwort: Wiki Syntax).

code2html
  1. sub code2html {
  2.  
  3. my $text=shift;
  4. $text =~ s/\[mail\]([^\[]*)\*([^\[]*)\[\/mail\]/<a href=\"mailto:$1\">$2<\/a>/gim;
  5. $text =~ s/\[www\]([^\[]*)\*([^\[]*)\[\/www\]/<a href=\"$1\" target=\"_blank\">$2<\/a>/gim;
  6. $text =~ s/\[b\]([^\[]*)\[\/b\]/<b>$1<\/b>/gim;
  7. $text =~ s/\[i\]([^\[]*)\[\/i\]/<i>$1<\/i>/gim;
  8. return $text;
  9.  
  10. }
Parsed in 0.002 seconds at 203.19 KB/s

Search
 
Full text search by name and content of a snippet.

User online
There are 2 users online.

Tags Cloud

Latest snippets
str2seconds
(Bash::Function)
is_integer
(Bash::Function)
file_rotate
(Bash::Function)
confirm
(Bash::Function)
is_workingtime
(Bash::Function)
last day of last month
(Bash::Snippets)
crypt_apr1_md5
(PHP::Function)
crypt_apr1_md5
(Perl::Function)
transparent
(CSS)
rfc2822Toiso8601
(PHP::Function)