I'm trying to figure out a regex pattern to find all occurrences in a string for this:
string = "List[5] List[6], List[10], List[100:] List[-2:] List[-2]"
re.findall("List[(.*?)]" , string)
# Expected output ['5', '6', '10', '100:', '-2:', '-2']
# Output: []
What would be a good regex pattern to get the numbers in between the indexes?