silentmatt / expr-eval

Mathematical expression evaluator in JavaScript
http://silentmatt.com/javascript-expression-evaluator/
MIT License
1.18k stars 239 forks source link

Escape point / dot in variable name #260

Open leogreu opened 3 years ago

leogreu commented 3 years ago

Hi,

I regularly have dots in my variable names (e.g., Item.001), but expr-eval throws an error when parsing these.

Can a dot within an expression be escaped? I tried \. or \\. but it did not work unfortunately.