[ic] Filter question - Is this possible?
Jon Jensen
jon at endpoint.com
Fri Nov 5 14:42:03 EST 2004
On Fri, 5 Nov 2004, Aftermarket Cellular wrote:
> Is there a way the filter out everything before a : For example
> take "Some text: Some more text" and return "Some text". I need to do
> this in the title field in one of my templates.
You can create your own filter in
$VENDROOT/code/Filter/stripfromcolon.filter:
CodeDef before_colon Filter
CodeDef before_colon Routine <<EOR
sub {
my ($val) = @_;
$val =~ s/:.*//;
return $val;
}
EOR
Then do [filter before_colon]Some text: Some more text[/filter].
Jon
--
Jon Jensen
End Point Corporation
http://www.endpoint.com/
Software development with Interchange, Perl, PostgreSQL, Apache, Linux, ...
More information about the interchange-users
mailing list