am12345 has asked for the wisdom of the Perl Monks concerning the following question:
$ perl -e '$_="foo\nbar"; print "1=|$1|\n" if m/(fo.+?)$/s' 1=|foo bar| $ perl -e '$_="foo\n"; print "1=|$1|\n" if m/(fo.+?)$/s' 1=|foo|
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Non-greedy match end of line bug?
by Fletch (Bishop) on Oct 26, 2021 at 01:31 UTC | |
by am12345 (Novice) on Oct 26, 2021 at 01:48 UTC | |
by kcott (Archbishop) on Oct 26, 2021 at 02:12 UTC | |
by am12345 (Novice) on Oct 26, 2021 at 20:35 UTC | |
by LanX (Saint) on Oct 26, 2021 at 21:48 UTC | |
| |
|
Re: Non-greedy match end of line bug?
by ikegami (Patriarch) on Oct 26, 2021 at 14:43 UTC | |
|
Re: Non-greedy match end of line bug?
by LanX (Saint) on Oct 26, 2021 at 15:08 UTC |