Regular Expressions 101

Ultimate number selecter

Open Workspace
  • Python
  • Match
1

Regular Expression

r"
(?P<isminus>-)? ( (?P<justdecimal> (?P<justdecpoint>\.) (?P<justdecdigits>\d+) ) | (?P<integer> (?P<withcommas> (?:\d{1,3}) (?:,\d{3})+ ) | (?P<nocommas>\d+) ) (?P<decimal> (?P<decpoint>\.) (?P<decdigits>\d+) )? )
"
gmx

Description

Selects all forms of numbers, ranging from decimals, to numbers with commas

Submitted by Anonymous