fork download
  1. #!/usr/bin/perl
  2.  
  3. my $str = "'SELECT * FROM TABLE WHERE COLUMN = \\'text\\'' ";
  4. print "$str\n";
  5. if ( $str =~ /'([^'\\]*(?:\\.[^'\\]*)*)'/ ) {
  6. print "$1\n";
  7. }
Success #stdin #stdout 0s 6044KB
stdin
Standard input is empty
stdout
'SELECT * FROM TABLE WHERE COLUMN = \'text\'' 
SELECT * FROM TABLE WHERE COLUMN = \'text\'