Regular Expressions 101

Numbers only (including decimals) ( JS work fine)

Open Workspace
  • JavaScript
  • Match
1

Regular Expression

/
\b0|([^\d*\.?\d*])
/
g

Description

Rejects first symbol if 0 and all other non number (doesn't includes .123 )

Submitted by Sofitt