Python Forum
Regex: Matches a number with commas for every three digits
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regex: Matches a number with commas for every three digits
#2
I tend to avoid look aheads/behinds in regexes. I think you could do just as well with non-digit matching (\D) outside of your main group. Then match 1 to 3 digits, followed by zero or more instances of a comma and three digits.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
RE: Regex: Matches a number with commas for every three digits - by ichabod801 - Jun-25-2019, 02:27 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  print on a single line with start/end brackets and commas Paulman 2 1,886 Oct-23-2021, 10:00 AM
Last Post: Paulman
  Analyzing data seperated by commas Kappel 2 1,953 Aug-07-2019, 01:46 PM
Last Post: ThomasL

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020