Anonymous
public text v1 · immutable[jmax@gir] ~ $ perl testes.pl
INPUT:
asdf
RESULT:
asdf
INPUT:
#asdf
RESULT:
INPUT:
"#asdF"
RESULT:
"
INPUT:
"lol#asdf"
RESULT:
"lol
INPUT:
[jmax@gir] ~ $ cat testes.pl
print "INPUT:\n";
while (<>) {
print "RESULT:\n";
s/("[^"*])#/$1\\#/;
s/(?<!\\)#.*//;
s/("[^"]*)\\#/$1#/;
print;
print "INPUT:\n";
}