Improved escaping and fixed regex components issue
Modern string formatting