D
d99alu
Hi!
I have a string, and I want to remove everything behind the ">"
character. The string contains new line characters that I don't want
to remove.
my $string = "line1
line2>
line3";
Why don't I get a match and replacement with this?
$string =~ s/^([^>]*>)/$1/;
I would expect the string to contain:
"line1
line2>"
But it still contains "line3"!!!
Why is this?
Any suggestions for how to do this in an other 8working) manner?
Best Regards,
Andreas - Sweden
I have a string, and I want to remove everything behind the ">"
character. The string contains new line characters that I don't want
to remove.
my $string = "line1
line2>
line3";
Why don't I get a match and replacement with this?
$string =~ s/^([^>]*>)/$1/;
I would expect the string to contain:
"line1
line2>"
But it still contains "line3"!!!
Why is this?
Any suggestions for how to do this in an other 8working) manner?
Best Regards,
Andreas - Sweden