import re
p = re.compile(r':RE\[(.*?)]:')
test_str = "# Even more commments\nWARNING:HDLParsers:817 - \":RE[.*]:/modules/top/hdl_src/cpu_0342.vhd\" Line :RE[.*]: Choice . is not a locally static expression."
print([x.start(1) for x in p.finditer(test_str)])