Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^([\d]+)[.]+
/
g

Description

num = num
            .replace(reg1, '')
            .replace(reg2, '')
            .replace(reg3, '$1_')
            .replace('.', '')
            .replace('_', '.');
Submitted by anonymous - 6 years ago