-
-
18 Aug 2022 06:41:54 UTC
- Distribution: SPVM-Regex
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues
- Testers (0 / 0 / 0)
- Kwalitee
Bus factor: 1- % Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (10.33KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors- USER_NAME<USER_MAIL>
- Dependencies
- SPVM::Resource::Re2::V2022_06_01
- SPVM::Unicode
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
Name
SPVM::Regex::Replacer - Interface Type for Regex Replacement Callback
Usage
use Regex::Replacer; use Regex; my $replacer = (Regex::Replacer)method : string ($re : Regex) { my $replaced_string_match = "AB" . $re->cap1 . "C"; return $replaced_string_match; }); my $string = "abc"; my $re = Regex->new("ab(c)"); my $replaced_string = $re->replace_g($string, $replacer);
Description
Regex::Replacer is the interface type for the regex replacement callback.
Interface Methods
required method : string ($re : Regex)
The implementation must receive a Regex object and return the string after the replacement.
Module Install Instructions
To install SPVM::Regex, copy and paste the appropriate command in to your terminal.
cpanm SPVM::Regex
perl -MCPAN -e shell install SPVM::Regex
For more information on module installation, please visit the detailed CPAN module installation guide.