A simple question but I can't find the answer. I'm scanning a huge pile of mails and would like to get rid of anything between () in the email adresses since this normally contains just info that varies over time. As a delimiter I use the ; between the email addresses. So this is basically the only character not allowed between ().
tst = "James, Jekyll (The.nice.guy@gmails.com \n); Hannibal, Hyde (from@hell ...)"
Obviously this doesn't work.
StringReplace[tst, "(" ~~ __ ... ~~ ")" -> ""]
It only leaves me James, Jekyll
So I assume I need a pattern like "("~~Anything Except ";"~~")" but how?
StringReplace[tst,"(" ~~ (DigitCharacter|WordCharacter|WhitespaceCharacter|"@"|"!"|".") ... ~~ ")" -> ""]
Will work but then to be safe I would need to get all characters in the ( | | etc) construct at seams unefficient.
Any thougths?