in reply to Re: Why \n matches but not $^? (weight)
in thread Why \n matches but not $^?
You don't have to understand everything to notice that the EXACT <C\nn> isn't what you were after. The literal <c>n has to come from the ...\n in the regex, so the thing before it (a newline) has to come from the previous token in the regex.$ perl -Mre=debug -wle 'm/C$\n^D/' Freeing REx: `","' Omitting $` $& $' support. EXECUTING... Compiling REx `C n^D' size 6 Got 52 bytes for offset annotations. first at 1 rarest char D at 3 1: EXACT <C\nn>(3) 3: BOL(4) 4: EXACT <D>(6) 6: END(0) anchored "C ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Why \n matches but not $^? (dump)
by tye (Sage) on Oct 14, 2008 at 00:02 UTC | |
|
Re^3: Why \n matches but not $^? (weight)
by tel2 (Pilgrim) on Oct 13, 2008 at 22:53 UTC | |
by moritz (Cardinal) on Oct 14, 2008 at 05:57 UTC |