Created
April 15, 2020 02:12
-
-
Save Napear/960b7dc9fef35368c97bef1faf02ec68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def remove_parenthetical(input_string): | |
regex = re.compile("([\(\[]).*?([\)\]])") | |
return re.sub(regex, '', input_string).strip() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment