digits_dot
Returns only digits (0-9) and periods (.).
This could be useful for decommifying numbers,
or simply stripping junk from numeric-only form fields.
Also see the digits
and integer filters.
Example
|
[filter digits_dot]$10,000.00[/filter]
|
Results in:
Source code
sub {
my $val = shift;
$val =~ s/[^\d.]+//g;
return $val;
}
|
If you would like to become an interchange.RTFM.info sponsor,
and get your logo into our list,
then please contact us.
The sponsorship logo list is also displayed on our home page.