in reply to
Re: RegEx related line split
in thread RegEx related line split
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.
"(?=" is zero width look ahead assertion and I wonder what is "$|" ?
Usually I will do this with character class
@lines = $RefLine =~ /(\([a-z]*\)[^\(]*)/g;
This will fail if $RefLine includes another ().
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.";
But your's works fine. More robust.
I am glad with some pointer or clue for me.