Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
^(?!(^0\d).)^\d*\.?\d+$
"
gm

Description

matches:

  • 1234
  • .0123
  • 0.123

no matches:

  • 01234
  • 01.234
Submitted by anonymous - 5 years ago