s/\([^)]*\)//
So in Python, you’d do:
re.sub(r'\([^)]*\)', '', filename)
More Related Contents:
- Convert perl regex to python [closed]
- Regexp finding longest common prefix of two strings
- Randomly generate 4 or 5 digit Unique Codes in Subsequent Runs of the Script
- How to use a variable inside a regular expression?
- Match a whole word in a string using dynamic regex
- How to check for valid email address? [duplicate]
- Case insensitive regular expression without re.compile?
- Python string.replace regular expression [duplicate]
- How can I find all matches to a regular expression in Python?
- Easiest way to replace a string using a dictionary of replacements?
- Recursive pattern in regex
- Find longest repetitive sequence in a string
- Python Regex instantly replace groups
- How to remove parentheses and all data within using Pandas/Python?
- Regular Expressions: Search in list
- Return string with first match for a regex, handling case where there is no match
- What’s the cleanest way to extract URLs from a string using Python?
- Regular expression: match start or whitespace
- Check if string matches pattern
- Scraping dynamic content in a website [duplicate]
- Regular expression parsing a binary file?
- Remove duplicate chars using regex?
- Python replace string pattern with output of function
- How can I make multiple replacements in a string using a dictionary?
- Creating a custom categorized corpus in NLTK and Python
- Warning raised by inserting 4-byte unicode to mysql
- How to use str.contains() with multiple expressions in pandas dataframes
- match dates using python regular expressions
- How to Fix JSON Key Values without double-quotes?
- How to use regex with optional characters in python?