Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8858205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:46:30+00:00 2026-06-14T14:46:30+00:00

I am looking to be able to split a string into a list around

  • 0

I am looking to be able to split a string into a list around anything that is not a numeral or a dot. Currently the split method only provides a way of doing a positive match for split, is a regex the best route to take in this situation?

For example, given the string "10.23, 10.13.21; 10.1 10.5 and 10.23.32"
This should return the list ['10.23', '10.13.21', '10.1', '10.5', '10.23.32']

As such I believe the best regex to use in this situation would be…
[\d\.]+

Is this the best way to handle such a case?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:46:32+00:00Added an answer on June 14, 2026 at 2:46 pm

    In case you are thinking of re.findall: you can use re.split with an inverted version of your regex:

    In [1]: import re
    
    In [2]: s = "10.23, 10.13.21; 10.1 10.5 and 10.23.32"
    
    In [3]: re.split(r'[^\d\.]+', s)
    Out[3]: ['10.23', '10.13.21', '10.1', '10.5', '10.23.32']
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking to be able to basically change ports that my express app is
I am looking for a way to be able to have a list of
I am looking for a performance profiler that is able to profile a C++
I'm looking to split space-delimited strings into a series of search terms. However, in
I'm just not that good at regex and I haven't been able to find
I am looking at how to split a string and store the info in
I am looking for a way to easily split a python list in half.
I'm looking for a free command line tool able to Split a A4 pdf
I'm looking to be able to produce a nicely formatted table with rows and
I am looking to be able to create two functions, BaseFunction and CallbackFunction where

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.