Name : perl-Regexp-Shellish
| |
Version : 0.93
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 1.64
| Date : 2024-08-05 17:36:22
|
Group : Development/Libraries/Perl
| Source RPM : perl-Regexp-Shellish-0.93-1.64.src.rpm
|
Size : 0.01 MB
| |
Packager : (none)
| |
Summary : Shell-like regular expressions
|
Description :
Provides shell-like regular expressions. The wildcards provided are \'?\', \'*\' and \'**\', where \'**\' is like \'*\' but matches \'/\'. See compile_shellish for details.
Case sensitivity and constructs like < **>, \'(a*b)\', and \'{a,b,c}\' can be disabled.
* compile_shellish
Compiles a string containing a \'shellish\' regular expression, returning a Regexp reference. Regexp references passed in are passed through unmolested.
Here are the transformation rules from shellish expression terms to perl regular expression terms:
Shellish Perl RE ======== ======= * [^/]* ? . ** .* ## unless { star_star => 0 } ... .* ## unless { dot_dot_dot => 0 }
( ( ## unless { parens => 0 } ) ) ## unless { parens => 0 }
{a,b,c} (?:a|b|c) ## unless { braces => 0 }
\\a a ## These are de-escaped and \\* \\* ## passed to quotemeta()
The wildcards treat newlines as normal characters.
Parens group in to $1..$n, since they are passed through unmolested (unless option parens => 0 is passed). This is useless when using glob_shellish(), though.
The final parameter can be a hash reference containing options:
compile_shellish( \'**\', { anchors => 0, ## Doesn\'t put ^ and $ around the case_sensitive => 0, ## Make case insensitive dot_dot_dot => 0, ## \'...\' is now just three \'.\' chars star_star => 0, ## \'**\' is now two \'*\' wildcards parens => 0, ## \'(\', \')\' are now regular chars braces => 0, ## \'{\', \'}\' are now regular chars } ) ;
No option affects Regexps passed through.
* shellish_glob
Pass a regular expression and a list of possible values, get back a list of matching values.
my AATTmatches = shellish_glob( \'*/*\', AATTpossibilities ) ; my AATTmatches = shellish_glob( \'*/*\', AATTpossibilities, \\%options ) ;
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-R/openSUSE_Tumbleweed/noarch |