I have a field text; there i have something like
blabla, blabla
Monday: 10-12
Tuesday:12-14
...
Sunday: 10-19
blablabla
I also use bbcodes like b or i in my text.
Then i have a global like
my ($rec) = @_;
my $d = $rec->{Text};
utf8::encode($d);
$d = GT::CGI::html_escape($d);
$d =~ s,\[(/?b)\],<$1>,g;
$d =~ s,\[(/?B)\],<$1>,g;
return $d;
}
Now i would like to do something like this:
[table]
Monday: 10-12
Tuesday:12-14
...
Sunday: 10-19
[/table]
My global should take everything between [table] and [/table] and substitue like this:
<table> then for all lines
New line start = <tr><td>
: = </td><td>
Line end = </td></tr>
end lines
</table>
the same should go with dl, dt, dd, i think. But i have no idea how todo it. May someone has an idea?
blabla, blabla
Monday: 10-12
Tuesday:12-14
...
Sunday: 10-19
blablabla
I also use bbcodes like b or i in my text.
Then i have a global like
Code:
sub { my ($rec) = @_;
my $d = $rec->{Text};
utf8::encode($d);
$d = GT::CGI::html_escape($d);
$d =~ s,\[(/?b)\],<$1>,g;
$d =~ s,\[(/?B)\],<$1>,g;
return $d;
}
Now i would like to do something like this:
[table]
Monday: 10-12
Tuesday:12-14
...
Sunday: 10-19
[/table]
My global should take everything between [table] and [/table] and substitue like this:
<table> then for all lines
New line start = <tr><td>
: = </td><td>
Line end = </td></tr>
end lines
</table>
the same should go with dl, dt, dd, i think. But i have no idea how todo it. May someone has an idea?