in reply to Re^9: how to remove a string from end of a line
in thread how to remove a string from end of a line
Now its getting very clear. The example you wrote to remove last 4 is $s =~ s{ (?: [|] [^|]*){4} \z }{}xms; and can be written also as $s =~ s{ ( [|] [^|]*){4} \z }{}xms; But if we don't need $1 values we can use "?:". As you advised I read "perlretut". From that I understand the "\z" used to indicate the end of the line and "ms" used for detecting multiple lines and "\n". And the "x" is used for increasing the readability of code in regex using spaces
|
|---|