updated regex for $translate. 

There were problem with space between bracket and quotation mark. I've added test case to test new regex.