in reply to how to fetch 1,2,3, from chapter
$f="chapter 1,2,3"; if($f=~m/chap( |[a-z])*([,0-9]+)/i) { print join ", ", map { "chapter $_" } split /,/,$2; }
|
---|
In Section
Seekers of Perl Wisdom
in reply to how to fetch 1,2,3, from chapter
$f="chapter 1,2,3"; if($f=~m/chap( |[a-z])*([,0-9]+)/i) { print join ", ", map { "chapter $_" } split /,/,$2; }
|
---|