Improved regex and added support for single quoted strings