Help for this page

Select Code to Download


  1. or download this
    my $string = 'bet';
    
    ...
    
    my $rx2 = qr/b[ae]t/;
    $string =~ /$rx2/;
    
  2. or download this
    Compiling REx `b(?:a|e)t'
    size 12 Got 100 bytes for offset annotations.
    ...
       2 <be> <t>             | 10:    EXACT <t>
       3 <bet> <>             | 12:    END
    Match successful!
    
  3. or download this
    Compiling REx `b[ae]t'
    size 16 Got 132 bytes for offset annotations.
    ...
    Match successful!
    Freeing REx: `"b(?:a|e)t"'
    Freeing REx: `"b[ae]t"'
    
  4. or download this
    Compiling REx "b(?:a|e)t"
    Final program:
    ...
       3 <bet> <>                | 12:END(0)
    Match successful!
    Freeing REx: "b(?:a|e)t"