Regular Expressions 101

Library entries

Trim leading zeroes in numbers 012.210 => 12.21

Vote

1

Regular Expression
pcre

/
^(\-{0,1})(?:(?:0*)(\d+))?((?:\.)(?:\d*?))?0*$
/
gm

Description

Loading markdown...
Submitted by FAy - 5 years ago