J
Jørn Dahl-Stamnes
I'm trying to extract parts of a string with the following line:
$relay =~ s/^\[(.+)\]$|^(.+) \[.+$/$1/;
But $relay contain data only if it match the first part of the expression.
I have tested both parts of the expression, and they both work.
Can the |-operator be used in the line above?
$relay =~ s/^\[(.+)\]$|^(.+) \[.+$/$1/;
But $relay contain data only if it match the first part of the expression.
I have tested both parts of the expression, and they both work.
Can the |-operator be used in the line above?