in reply to Match nothing in grep { ! // }
Yeah , and then what? What is your question?
The empty regex always matches
$ perl -Mre=debug -e " m//" Compiling REx "" Final program: 1: NOTHING (2) 2: END (0) minlen 0 Matching REx "" against "" 0 <> <> | 1:NOTHING(2) 0 <> <> | 2:END(0) Match successful! Freeing REx: "" $ perl -Mre=debug -e " $_ = q/fi/; m//" Compiling REx "" Final program: 1: NOTHING (2) 2: END (0) minlen 0 Matching REx "" against "fi" 0 <> <fi> | 1:NOTHING(2) 0 <> <fi> | 2:END(0) Match successful! Freeing REx: ""
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Match nothing in grep { ! // }
by bart (Canon) on Mar 14, 2013 at 12:07 UTC | |
|
Re^2: Match nothing in grep { ! // }
by ag4ve (Monk) on Mar 14, 2013 at 08:20 UTC | |
by McA (Priest) on Mar 14, 2013 at 09:21 UTC | |
by Anonymous Monk on Mar 14, 2013 at 09:58 UTC |