Data::Object::Search
Data-Object Search Class
use Data::Object::Search; my $result = Data::Object::Search->new([ $regexp, $altered_string, $count, $last_match_end, $last_match_start, $named_captures, $initial_string ]);
This package provides routines for introspecting the results of a regexp search operation.
This package inherits behaviors from:
Data::Object::Array
This package uses type constraints defined by:
Data::Object::Library
This package implements the following methods.
captures() : ArrayObject
The captures method returns the capture groups from the result object which contains information about the results of the regular expression operation.
my $captures = $result->captures();
count() : NumObject
The regexp method returns the regular expression used to perform the match from the result object which contains information about the results of the regular expression operation.
my $count = $result->count();
initial() : StrObject
The initial method returns the unaltered string from the result object which contains information about the results of the regular expression operation.
my $initial = $result->initial();
last() : Any
The last_match_end method returns an array of offset positions into the string where the capture(s) stopped matching from the result object which contains information about the results of the regular expression operation.
my $last_match_end = $result->last_match_end();
The last_match_start method returns an array of offset positions into the string where the capture(s) matched from the result object which contains information about the results of the regular expression operation.
my $last_match_start = $result->last_match_start();
matched() : StrObject | UndefObject
The matched method returns the portion of the string that matched from the result object which contains information about the results of the regular expression operation.
my $matched = $result->matched();
name() : StrObject
The named_captures method returns a hash containing the requested named regular expressions and captured string pairs from the result object which contains information about the results of the regular expression operation.
my $named_captures = $result->named_captures();
postmatched() : StrObject | UndefObject
The postmatched method returns the portion of the string after the regular expression matched from the result object which contains information about the results of the regular expression operation.
my $postmatched = $result->postmatched();
prematched() : StrObject | UndefObject
The prematched method returns the portion of the string before the regular expression matched from the result object which contains information about the results of the regular expression operation.
my $prematched = $result->prematched();
regexp() : RegexpObject
my $regexp = $result->regexp();
string() : StrObject
The string method returns the string matched against the regular expression from the result object which contains information about the results of the regular expression operation.
my $string = $result->string();
Al Newkirk, +309
+309
Anthony Brummett, +10
+10
Adam Hopkins, +2
+2
José Joaquín Atria, +1
+1
Al Newkirk, awncorp@cpan.org
awncorp@cpan.org
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Wiki
Project
Initiatives
Milestones
Contributing
Issues
To get the most out of this distribution, consider reading the following:
Do
Data::Object
Data::Object::Class
Data::Object::ClassHas
Data::Object::Role
Data::Object::RoleHas
To install Do, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Do
CPAN shell
perl -MCPAN -e shell install Do
For more information on module installation, please visit the detailed CPAN module installation guide.