in reply to How to parsing quoted strings in my case.

Perhaps it would be better to use a real parser like Parser::RecDescent.

Also please wrap code fragments in your post into <code></code> tags