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

  • Home
  • SEARCH
  • 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 8155117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:34:38+00:00 2026-06-06T16:34:38+00:00

I have a string built from a few segments, which are not separated, but

  • 0

I have a string built from a few segments, which are not separated, but not overlap. This looks like that:

<python><regex><split>

I would like to split in into:

<python>, <regex>, <split>

I’m looking for the most efficient way to do that, and in the same time with as little code as possible. I could change ‘>’ into ‘> ‘ etc., but I don’t want to do any redundant operations. Is it possible to use regex to do that?

  • 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-06T16:34:39+00:00Added an answer on June 6, 2026 at 4:34 pm

    Try re.findall:

    import re
    your_string = '<python><regex><split>'
    parts = re.findall(r'<.+?>', your_string)  
    print parts # ['<python>', '<regex>', '<split>']
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have built a system that checks user IP, browser, and a random-string
I have a need to build the data string dynamically. This is not working,
I am writing a translator, and have quite a few java String literals that
I'm not sure if this is even possible, but here goes: I have a
I have a console application that uses a database connection string which is defined
I'm attempting to build a method call from strings that have been passed into
I have the following data that basically I only need a few bits of
I have built an ASP.NET MVC app some time ago, and after a few
I have a few models that contain static data, and I'm trying to cache
I have been trying to work out the bug on this but can't seem

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.