I have a string:
HLN (Formerly Headline News)
I want to remove everything inside the parens and the parens themselves, leaving only:
<
You could use the following regular expression to find parentheticals:
\([^)]*\)
the \( matches on a left parenthesis, the [^)]* matches any number of characters other than the right parenthesis, and the \) matches on a right parenthesis.
If you're including this in a java string, you must escape the \ characters like the following:
String regex = "\\([^)]*\\)";