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(?=$|MARK)
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. regards.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.";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: RegEx related line split
by JavaFan (Canon) on Nov 14, 2011 at 11:41 UTC | |
by remiah (Hermit) on Nov 14, 2011 at 12:40 UTC |
In Section
Seekers of Perl Wisdom