Would you mind if I ask my question? I don't understand "$ option" and saw perlre's Extended Patterns, but I could not figure out what is this.
in reply to Re: RegEx related line split
in thread RegEx related line split
"(?=" is zero width look ahead assertion and I wonder what is "$|" ?
Usually I will do this with character class
This will fail if $RefLine includes another ().
@lines = $RefLine =~ /(\([a-z]*\)[^\(]*)/g;
But your's works fine. More robust.
I am glad with some pointer or clue for me.
my $RefLine = "(a) This is first line(once all 4 lines were one line).
+ (b) This is second line; (
c) This is different line 32. (d) Here is the last line.";