P is for Practical | |
PerlMonks |
Re: Basic but stupid problem i cannot wrap my head aroundby jeffenstein (Hermit) |
on Aug 06, 2020 at 16:50 UTC ( [id://11120433]=note: print w/replies, xml ) | Need Help?? |
Are you expecting "b" for the second example? /^(.*?)\// matches both strings, but $1 in the second example is the zero-length string before the slash. Maybe you meant /^(.+?)\//?
In Section
Seekers of Perl Wisdom
|
|