in reply to Re^3: Strange regex to test for newlines: /.*\z/
in thread Strange regex to test for newlines: /.*\z/
/s or not /s doesn't have to do something with this, or at least it shouldn't, i think."\n" =~ /\n.*\z/; # matches "\n" =~ /.*\z/; # doesn't match. i would expect it to match "\n" =~ /[^\n]*\z/; # matches. like expected. but [\n]* is like .*
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Strange regex to test for newlines: /.*\z/
by shmem (Chancellor) on May 21, 2007 at 15:44 UTC | |
by betterworld (Curate) on May 22, 2007 at 00:46 UTC |