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.
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.