in reply to Re: Parsing/regex help required
in thread Parsing/regex help required
each paragraph text is captured using mojo->all_text so that's all good. Running that code:
givesmy $entry = "123. The Quick brown fox – jumped over"; my( $num, $text1, $text2 )= $entry =~ m{^ (\d+) \. \s+ (.*?) \s+-\s+ ( +.*?) $}x; say "$num|$text1|$text2";
Use of uninitialized value $num in concatenation (.) or string at ./te +st.pl line 10. Use of uninitialized value $text1 in concatenation (.) or string at ./ +test.pl line 10. Use of uninitialized value $text2 in concatenation (.) or string at ./ +test.pl line 10. ||
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Parsing/regex help required
by Fletch (Bishop) on Sep 27, 2021 at 19:50 UTC | |
Re^3: Parsing/regex help required
by AnomalousMonk (Archbishop) on Sep 27, 2021 at 20:01 UTC |
In Section
Seekers of Perl Wisdom