nl_tokens: Public : Parses a string containing a number . s - The string to parse . Returns a number or null if parsing fails .
pl_tokens: function parseNumber ( s ) { s = String ( s ) . replace ( / [^\d-.] / g , '' ) . replace ( / \.$ / , '' ) ; if ( ! s . <mask> ( NUMBER_RE ) ) { return null ; } return parseFloat ( s , 10 ) ; }