++ed by:
BEROV HAMMER AZJADFTRE KES MHOWARD

14 PAUSE users
7 non-PAUSE users.

Author image Yuki Kimoto

NAME

SPVM::Regex::Replacer - a callback type for the regex replacement

SYNOPSYS

  use SPVM::Regex::Replacer;
  
  my $replacer : SPVM::Regex::Replacer = sub : string ($self : self, $re : SPVM::Regex) {
    return "AB" . $re->caps->[0] . "C";
  });
  
  my $re = SPVM::Regex->new("ab(c)");
  my $str_for_replace = $replacer->($re);

DESCRIPTION

SPVM::Regex::Replacer is a callback type for the regex replacement

CALLBACK METHOD

  sub : string ($self : self, $re : SPVM::Regex)

This method must return a string for replacement in the method implementation.