jeanluca has asked for the wisdom of the Perl Monks concerning the following question:
which gives me: abc_ef_23_56, but I expected abc _ef _23 _56my $str = "abc def 123 456" ; $str =~ s/(?:\s)\w/_/g ; print $str ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: is (?: ... ) capturing
by ysth (Canon) on Sep 07, 2009 at 07:35 UTC | |
by jeanluca (Deacon) on Sep 07, 2009 at 07:45 UTC | |
by ysth (Canon) on Sep 07, 2009 at 07:47 UTC | |
by ikegami (Patriarch) on Sep 07, 2009 at 09:30 UTC | |
by ysth (Canon) on Sep 07, 2009 at 17:18 UTC | |
by jeanluca (Deacon) on Sep 07, 2009 at 07:51 UTC | |
|
Re: is (?: ... ) capturing
by Anonymous Monk on Sep 07, 2009 at 07:34 UTC |