Bash appears to ignore the lazy ? operator in the following regex, matching past the first ":" character. Please explain the mistake or the behavior...

if [[ $line =~ ^(.+?): ]]; then

Fixed with:

if [[ $line =~ ^([^:]+) ]]; then