Regexp::ExtendedRegexp::Extended is a Perl wrapper that extends the re module with new features. | |
Download |
Regexp::Extended Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Daniel Shane
- Publisher web site:
- http://search.cpan.org/~crunchie/Regexp-Extended-0.01/Extended.pm
Regexp::Extended Tags
Regexp::Extended Description
Regexp::Extended is a Perl wrapper that extends the re module with new features. Regexp::Extended is a Perl wrapper that extends the re module with new features.SYNOPSIS use Regexp::Extended qw(:all); # (?...): named parameters $date =~ /(?d+)-(?d+)-(?d+)/; if ("2002-10-30" =~ /$date/) { print "The date is : $::year->-$::month->-$::day->n"; } # You can also access individial matches in ()* or ()+ "1234" =~ /(?d)+/; print "Digit 1 is : $::digit->n"; print "Digit 2 is : $::digit->n"; ... # You can also modify individual matches "1234" =~ /(?d)+/; $::digit-> = 99; $::digit-> = 88; print "Modified string is: " . rebuild("1234"); # "998834" # (?*...): upto a certain pattern $text = "this is some italic text"; $text =~ /((?*))/; # $1 = "italic" # (?+...): upto and including a certain pattern $text = "this is some italic text"; $text =~ /((?+))/; # $1 = "italic" # You can also use fonctions inside patterns: sub foo { return "foo"; } "foo bar" =~ /((?&foo()))/; # $1 => "foo"Rexexp::Extended is a simple wrapper arround the perl rexexp syntax. It uses the overload module to parse constant qr// expressions and substitute known operators with an equivalent perl re.Requirements:· Perl Requirements: · Perl
Regexp::Extended Related Software