Name
SPVM::Regex::ReplaceInfo - Regex Replacement Information
Description
Regex::ReplaceInfo class in SPVM represents a regex replacement information.
Usage
use Regex::ReplaceInfo;
my $replace_info = Regex::ReplaceInfo->new({replaced_count => 3, match => $match});
my $replaced_count = $replace_info->replaced_count;
my $match = $replace_info->match;
my $cap1 = $match->cap1;
my $cap2 = $match->cap2;
my $cpa3 = $match->cap3;
Fields
replaced_count
has replaced_count : ro int;
This field is set to the number of strings replaced the replace and replace_g method in the Regex class.
match
has match : ro Regex::Match;
This field is set to the result of the pattern match performed by the the replace and replace_g method in the Regex class.
Class Methods
new
static method new : Regex::ReplaceInfo ($options : object[] = undef);
Creates a new Regex::ReplaceInfo object, and returns it.
Options:
replaced_count
: IntSets the "replaced_count" field.
match
: Regex::MatchSets the "match" field.
See Also
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License