#!/bin/sh

STRING=$( cat <<EOF
cabinetmaker
calcographer
calligrapher
campanologer
campylometer
c..........er
c........er
..........
foobar
EOF
)

echo "$STRING" | grep -xE '.{12}' | grep 'c.*er'