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 7006749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:31:03+00:00 2026-05-27T21:31:03+00:00

I need to remove the parenthesis and content within each set of parenthesis from

  • 0

I need to remove the parenthesis and content within each set of parenthesis from some text.

I would like to do this with regular expressions. However, I don’t know the first thing about re in Python.

text Direxion, a leader in alternative investment solutions, has named Angelo Pirri as its new Senior Regional Director for the Northwest Region. (Logo: http://photos.prnewswire.com/prnh/20100701/NY29766LOGO) Mr. Pirri is responsible for selling and distributing all of Direxion’s buy-and-hold alternative investment strategy products to financial advisors across all channels, including wirehouses, regional broker dealers, registered investment advisor (RIA) and others in his territory. Mr. Pirri will serve advisors in northern California, Oregon, Washington, Hawaii, Wyoming, Idaho, Alaska, and Montana….

get rid of the stuff in parenthesis…

I haven’t tried anything yet… I want someone else to tell me what to do, I don’t want to do any work.

  • 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-05-27T21:31:04+00:00Added an answer on May 27, 2026 at 9:31 pm
    text = "Some sample (with parenthesis) text"
    regEx = re.compile(r'([^\(]*)\([^\)]*\) *(.*)')
    m = regEx.match(text)
    while m:
      text = m.group(1) + m.group(2)
      m = regEx.match(text)
    print text
    

    It’s just a matter of formatting the right regex to match your text… The above will iteratively remove sets of parenthesis from a string, one set at a time, but fail if you have nested parenthesis. That’s a whole different problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to remove these ' & ' characters from each property of a
From text: Text... Target row Text... I need remove row with string ' Target
I need to remove a single character from a string, eg in the text
I need to remove the sorting arrow from a column header. This can be
I need to remove the first forward slash inside link formatted like this: /directory/link.php
I need to remove attribute from XML document by this attribute's XPath. Everything should
I have values like this: aaa_1, bb_5, c_21, a_b. Now i need remove trailing
I need to remove everything (parentheses, punctuation, etc), using PHP, from a text string
I need to remove the namespace prefix from an un-SOAP'd message. This is the
I need to remove all values from a set of lists inside a list

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.