#!/usr/bin/perl
use warnings;
use strict;
my $string = 'd"alice';
{
use re 'debug';
open STDERR, '>', 'err.txt' or die $!;
open STDOUT, '>', 'out.txt' or die $!;
$string =~ s/\bd\"//g;
}
$string =~ /alice/;
####
$ ./bound.pl
Compiling REx "\bd\%""
Final program:
1: BOUND (2)
2: EXACT (4)
4: END (0)
anchored "d%"" at 0 (checking anchored) stclass BOUND minlen 2
####
Compiling REx "\bd\%""
Final program:
1: BOUND (2)
2: EXACT (4)
4: END (0)
anchored "d%"" at 0 (checking anchored) stclass BOUND minlen 2
Matching REx "\bd\%"" against "d%"alice"
Intuit: trying to determine minimum start position...
doing 'check' fbm scan, [0..7] gave 0
Found anchored substr "d%"" at offset 0 (rx_origin now 0)...
(multiline anchor test skipped)
looking for class: start_shift: 0 check_at: 0 rx_origin: 0 endpos: 1
Does not contradict STCLASS...
Intuit: Successfully guessed: match at offset 0
0 <> | 1:BOUND(2)
0 <> | 2:EXACT (4)
2 | 4:END(0)
Match successful!
Matching REx "\bd\%"" against "alice"
Intuit: trying to determine minimum start position...
doing 'check' fbm scan, [2..7] gave -1
Did not find anchored substr "d%""...
Match rejected by optimizer
Freeing REx: "\bd\%""