I’m no Python expert but maybe you could just remove the empty strings from your list?
str_list = re.split('^[0-9]+_[LU]_|-|\.txt$', f)
time_info = filter(None, str_list)
More Related Contents:
- How to make a this specific Pattern [closed]
- Regex in Python and save in csv [closed]
- Convert perl regex to python [closed]
- Is there a simple way to remove multiple spaces in a string?
- How to correctly sort a string with a number inside? [duplicate]
- Regular expression to match a dot
- Python non-greedy regexes
- Match text between two strings with regular expression
- How to replace only part of the match with python re.sub
- Replace first occurrence of string in Python
- BeautifulSoup webscraping find_all( ): finding exact match
- How to handle response encoding from urllib.request.urlopen() , to avoid TypeError: can’t use a string pattern on a bytes-like object
- Python – RegEx for splitting text into sentences (sentence-tokenizing) [duplicate]
- Python regex string matching?
- Re.match() returns always none
- How to use regular expression in lxml xpath?
- Why isn’t the regular expression’s “non-capturing” group working?
- Python regular expression for HTML parsing
- Remove Sub String by using Python
- Regex: match only outside parenthesis (so that the text isn’t split within parenthesis)?
- Faster way to remove stop words in Python
- Why doesn’t Python’s `re.split()` split on zero-length matches?
- Regular expression that finds and replaces non-ascii characters with Python
- Regex and unicode
- How to parse complex text files using Python?
- How can I find all placeholders for str.format in a python string using a regex? [duplicate]
- restrict 1 word as case sensitive and other as case insensitive in python regex | (pipe)
- Python TypeError on regex [duplicate]
- In regex, what does [\w*] mean?
- Adding characters after a certain word in Python using regex