For more information... RTFM!
NAVIGATION
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

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:

10000.00

Source code

sub {
    my $val = shift;
    $val =~ s/[^\d.]+//g;
    return $val;
}

Category:  Filters
Last modified by: Kevin Walsh
Modification date: Monday 26 February 2007 at 11:48 AM (EST)
Home  |  Legal nonsense  |  Privacy policy  |  Contact us