in reply to OptiPerls Pattern Replace (Regexpses for one Line)
/.*/ should do, as a dot matches anything that's not a newline. However, I'm trying to get rid of the habit, and try to learn myself to use /[^\n]*/ instead. This makes it easier to slap /s on your regex if you want dot to really match everything. And in Perl6, a dot will match everything anyway. If only Perl5 would recognize \N.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: OptiPerls Pattern Replace (Regexpses for one Line)
by Ben Win Lue (Friar) on Mar 02, 2005 at 10:45 UTC |