[ create a new paste ] login | about

Link: http://codepad.org/g1jwi5fk    [ raw code | output | fork ]

Perl, pasted on Aug 15:
1
2
3
4
5
6
7
use warnings;
use strict;

my $l = 'this is my string "hello world some" one two three "some hello word"';
$l =~ s/ +(?=[^"]*(?:"[^"]*"[^"]*)+$)//g;

print $l;


Output:
1
thisismystring"hello world some"onetwothree"some hello word"


Create a new paste based on this one


Comments: