Heres what it would look like with bleadperl (future 5.10):
D:\dev\perl\ver\verbs\win32>..\perl -Mre=debug -e "'hello world' =~ /l +.w/" Compiling REx "l.w" Final program: 1: EXACT <l>(3) 3: REG_ANY(4) 4: EXACT <w>(6) 6: END(0) anchored "l" at 0 (checking anchored) minlen 3 Guessing start of match in sv for REx "l.w" against "hello world" Found anchored substr "l" at offset 2... Starting position does not contradict /^/m... Guessed: match at offset 2 Matching REx "l.w" against "llo world" 2 <he> <llo world> | 1:EXACT <l>(3) 3 <hel> <lo world> | 3:REG_ANY(4) 4 <hell> <o world> | 4:EXACT <w>(6) failed... 3 <hel> <lo world> | 1:EXACT <l>(3) 4 <hell> <o world> | 3:REG_ANY(4) 5 <hello> < world> | 4:EXACT <w>(6) failed... 9 <hello wor> <ld> | 1:EXACT <l>(3) 10 <hello worl> <d> | 3:REG_ANY(4) 11 <hello world> <> | 4:EXACT <w>(6) failed... Match failed Freeing REx: "l.w"
But this pattern is IMO not a particularly good example. It doesn't use very sophisticated constructs so it doesnt illustrate the potential breadth of what someone could want to know. Something with lots of alternations and different quantifiers and dynamic patterns would be a much better example.
In reply to Re: alternate markup for the 're' pragma
by demerphq
in thread alternate markup for the 're' pragma
by szabgab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |