Text::RewriteRules 0.10
Sponsored Links
Text::RewriteRules 0.10 Ranking & Summary
File size:
0.008 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
843
Date added:
2007-07-10
Publisher:
Alberto Simões and José João Almeida
Text::RewriteRules 0.10 description
Text::RewriteRules Perl module contains a system to rewrite text using regexp-based rules.
SYNOPSIS
use Text::RewriteRules;
RULES email
.==> DOT
@==> AT
ENDRULES
email("ambs@cpan.org") # returns ambs AT cpan DOT org
RULES/m inc
(d+)=e=> $1+1
ENDRULE
inc("I saw 11 cats and 23 docs") # returns I saw 12 cats and 24 docs
ABSTRACT
This module uses a simplified syntax for regexp-based rules for rewriting text. You define a set of rules, and the system applies them until no more rule can be applied.
Two variants are provided:
traditional rewrite (RULES function):
while it is possible do substitute
| apply first substitution rule
cursor based rewrite (RULES/m function):
add a cursor to the begining of the string
while not reach end of string
| apply substitute just after cursor and advance cursor
| or advance cursor if no rule can be applied
A lot of computer science problems can be solved using rewriting rules.
Rewriting rules consist of mainly two parts: a regexp (LHS: Left Hand Side) that is matched with the text, and the string to use to substitute the content matched with the regexp (RHS: Right Hand Side).
Now, why dont use a simple substitute? Because we want to define a set of rules and match them again and again, until no more regexp of the LHS matches.
A point of discussion is the syntax to define this system. A brief discussion shown that some users would prefer a function to receive an hash with the rules, some other, prefer some syntax sugar.
The approach used is the last: we use Filter::Simple such that we can add a specific non-perl syntax inside the Perl script. This improves legibility of big rewriting rules sytems.
This documentation is divided in two parts: first we will see the reference of the module. Kind of, what it does, with a brief explanation. Follows a tutorial which will be growing through time and releases.
SYNOPSIS
use Text::RewriteRules;
RULES email
.==> DOT
@==> AT
ENDRULES
email("ambs@cpan.org") # returns ambs AT cpan DOT org
RULES/m inc
(d+)=e=> $1+1
ENDRULE
inc("I saw 11 cats and 23 docs") # returns I saw 12 cats and 24 docs
ABSTRACT
This module uses a simplified syntax for regexp-based rules for rewriting text. You define a set of rules, and the system applies them until no more rule can be applied.
Two variants are provided:
traditional rewrite (RULES function):
while it is possible do substitute
| apply first substitution rule
cursor based rewrite (RULES/m function):
add a cursor to the begining of the string
while not reach end of string
| apply substitute just after cursor and advance cursor
| or advance cursor if no rule can be applied
A lot of computer science problems can be solved using rewriting rules.
Rewriting rules consist of mainly two parts: a regexp (LHS: Left Hand Side) that is matched with the text, and the string to use to substitute the content matched with the regexp (RHS: Right Hand Side).
Now, why dont use a simple substitute? Because we want to define a set of rules and match them again and again, until no more regexp of the LHS matches.
A point of discussion is the syntax to define this system. A brief discussion shown that some users would prefer a function to receive an hash with the rules, some other, prefer some syntax sugar.
The approach used is the last: we use Filter::Simple such that we can add a specific non-perl syntax inside the Perl script. This improves legibility of big rewriting rules sytems.
This documentation is divided in two parts: first we will see the reference of the module. Kind of, what it does, with a brief explanation. Follows a tutorial which will be growing through time and releases.
Text::RewriteRules 0.10 Screenshot
Text::RewriteRules 0.10 Keywords
RewriteRules
RULES
RewriteRules 0.10
RewriteRules Perl
to rewrite
rewrite text
Perl module
system
text
module
rewrite
Perl
using
Text::RewriteRules
TextRewriteRules
Text::RewriteRules 0.10
Bookmark Text::RewriteRules 0.10
Text::RewriteRules 0.10 Copyright
WareSeeker periodically updates pricing and software information of Text::RewriteRules 0.10 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Text::RewriteRules 0.10 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
how to rewrite on rw cd s
rewrite rules
software to rewrite text
perl modules
install perl module
rewrite rules version 2.2 list-post site httpd.apache.org
module master
systemax
rewriteable cds
how to rewrite a rewritable cd
lunar module
solar system
dvd rewriter
installing perl module
how to rewrite sonic recordnow
system sensor
rewrite cd
module allows users
Related Software
Text::Replace is a Perl module to replace variables from a hash. Free Download
Text::ScriptTemplate is a standalone ASP/JSP/PHP-style template processor. Free Download
Text::XLogfile module allows reading and writing xlogfiles. Free Download
Text::MetaMarkup::HTML is a MM-to-HTML converter. Free Download
Text::Reform is a Perl module for manual text wrapping and reformatting. Free Download
ExtUtils::SVDmaker is a Perl module to create CPAN distributions. Free Download
Sub::Exporter is a sophisticated exporter for custom-built routines. Free Download
Text::VimColor is a syntax color text in HTML or XML using Vim. Free Download
Latest Software
Popular Software
Favourite Software