Python Forum
seeking simple|clean|pythonic way to capture {1,} numeric clusters
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
seeking simple|clean|pythonic way to capture {1,} numeric clusters
#4
Tim Peters Wrote:Simple is better than complex
Rather than rewriting a 'better' re module, you could simply use two lines, the first regex could capture the whole substring "22 1 333" in a group, the second line would split this substring in a sequence of numbers. It is a very elegant solution to this problem.
Reply


Messages In This Thread
RE: seeking simple|clean|pythonic way to capture {1,} numeric clusters - by Gribouillis - Jun-06-2021, 10:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Seeking advice on dask distributed sawtooth500 4 314 Apr-15-2024, 11:07 PM
Last Post: sawtooth500
  Numeric Enigma Machine idev 9 606 Mar-29-2024, 06:15 PM
Last Post: idev
  Can i clean this code ? BSDevo 8 965 Oct-28-2023, 05:50 PM
Last Post: BSDevo
  Clean Up Script rotw121 2 1,024 May-25-2022, 03:24 PM
Last Post: rotw121
  How to clean UART string Joni_Engr 4 2,522 Dec-03-2021, 05:58 PM
Last Post: deanhystad
Question Numeric Anagrams - Count Occurances monty024 2 1,523 Nov-13-2021, 05:05 PM
Last Post: monty024
  How to get datetime from numeric format field klllmmm 3 2,019 Nov-06-2021, 03:26 PM
Last Post: snippsat
  Extract continuous numeric characters from a string in Python Robotguy 2 2,666 Jan-16-2021, 12:44 AM
Last Post: snippsat
  Clusters dawid294 6 2,387 Sep-17-2020, 02:18 PM
Last Post: Larz60+
  New user seeking help EdRaponi 2 46,250 Jun-23-2020, 12:03 PM
Last Post: EdRaponi

Forum Jump:

User Panel Messages

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