re::engine::LPEG - LPEG regular expression engine
use re::engine::LPEG; if ('Hello, world' =~ m{ ( 'Hello' / 'Hi' ) ', ' { 'world' } }); print "Greetings, $1!"; }
THIS MODULE IS A FAILURE. THE re-engine INTERFACE IS NOT THE RIGHT WAY TO WRAP LPeg.
Replaces perl's regex engine in a given lexical scope with the LPeg one.
See "Regex syntax for LPEG", on http://www.inf.puc-rio.br/~roberto/lpeg/re.html.
Literal string must be quoted or double quoted. Spaces are not significatives.
LPeg works only in anchored mode. So LPeg is unusable with split, and not suitable for s///.
split
s///
'/' represents an ordered choice, so the syntax 'm{pattern}' is more readeable than '/pattern/' where '/' must be escaped.
'/'
'm{pattern}'
'/pattern/'
Pre-defined character classes start by '%' (like in the Lua string library). See http://www.lua.org/manual/5.1/manual.html#5.4.1.
'%'
François PERRAD <francois.perrad@gadz.org>
The development is hosted at http://code.google.com/p/re-engine-lpeg/.
Copyright 2008 François PERRAD.
This program is free software; you can redistribute it and/or modify it under the same terms as Lua & LPeg, see http://www.lua.org/license.html.
To install re::engine::LPEG, copy and paste the appropriate command in to your terminal.
cpanm
cpanm re::engine::LPEG
CPAN shell
perl -MCPAN -e shell install re::engine::LPEG
For more information on module installation, please visit the detailed CPAN module installation guide.