Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
the result is "four fifth frog fred" this is correct.#!/usr/bin/perl use strict; use warnings; $_="four fifth two frog left leaf fred wolf foul"; my @F=m/\bf.*?\b/g; print "@F";
i get all the string "four fifth two frog left leaf fred wolf" and it must be "leaf wolf".$_="four fifth two frog left leaf fred wolf"; my @F=m/\b.*?f\b/g; print "@F";
the result "fifth two frog left leaf fred wolf"$_="four fifth two frog left leaf fred wolf"; my @F=m/\b[^f].*?f.*?\b/g; print "@F";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: words wich ends with "f"
by psini (Deacon) on Jun 19, 2008 at 15:23 UTC | |
|
Re: words wich ends with "f"
by moritz (Cardinal) on Jun 19, 2008 at 15:18 UTC | |
by ikegami (Patriarch) on Jun 19, 2008 at 17:38 UTC | |
by moritz (Cardinal) on Jun 19, 2008 at 20:45 UTC | |
by ikegami (Patriarch) on Jun 19, 2008 at 21:46 UTC | |
|
Re: words wich ends with "f"
by b10m (Vicar) on Jun 19, 2008 at 15:23 UTC |