import re
list_strings = ['[ABC1: text1]', '[[DC: this is a text]]', '[ABC-O: potatoes]', '[[C-DF: hello]]']
#remove from [ up to :
for string in list_strings:
m = re.search(r'\[+[A-Z\d-]+:\s*(.*?)\s*]', string)
if m:
print(m.group(1))
# All matches
matches = re.findall(r'\[+[A-Z\d-]+:\s*(.*?)\s*]', string)
print(matches)
aW1wb3J0IHJlCmxpc3Rfc3RyaW5ncyA9IFsnW0FCQzE6IHRleHQxXScsICdbW0RDOiB0aGlzIGlzIGEgdGV4dF1dJywgJ1tBQkMtTzogcG90YXRvZXNdJywgJ1tbQy1ERjogaGVsbG9dXSddCgojcmVtb3ZlIGZyb20gWyB1cCB0byA6IApmb3Igc3RyaW5nIGluIGxpc3Rfc3RyaW5nczoKCW0gPSByZS5zZWFyY2gocidcWytbQS1aXGQtXSs6XHMqKC4qPylccypdJywgc3RyaW5nKQoJaWYgbToKCQlwcmludChtLmdyb3VwKDEpKQoKCSMgQWxsIG1hdGNoZXMKCW1hdGNoZXMgPSByZS5maW5kYWxsKHInXFsrW0EtWlxkLV0rOlxzKiguKj8pXHMqXScsIHN0cmluZykKCXByaW50KG1hdGNoZXMp