Help for this page

Select Code to Download


  1. or download this
               +------------ Matched at pos 0.
               |   +-------- Matched at pos 1.
    ...
               |   || |||
               v   vv vvv
    'abcd' =~ /a(?!BC)..d/  # Matches
    
  2. or download this
    my $s = 'abcd';
    $s =~ s/a(?=bc)/x/;  # xbcd
    
    my $s = 'aefg';
    $s =~ s/a(?=bc)/x/;  # abcd