$rex = qr/my.STRING/is; print $rex; # prints (?si-xm:my.STRING) s/$rex/foo/;
Standard input is empty
(?^si:my.STRING)
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!