Fix regex pattern for image code completion