use reg to parse string literal