input="text with 'single-quotes'."; pattern = new RegExp('\'.*\''); print(pattern.exec(input));
Standard input is empty
'single-quotes'
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!