• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

List-Regexp-1.03/H13-Feb-2021-1,5821,098

lib/List/H13-Feb-2021-446251

t/H13-Feb-2021-14897

ChangesH A D13-Feb-2021251 1810

LICENSEH A D03-Oct-201634.3 KiB675553

MANIFESTH A D13-Feb-2021820 3534

MANIFEST.SKIPH A D13-Feb-2021880 6454

META.jsonH A D13-Feb-20211.3 KiB5958

META.ymlH A D13-Feb-2021727 3029

Makefile.PLH A D13-Feb-20211.6 KiB4527

READMEH A D16-Mar-20161.3 KiB4936

regexp-optH A D03-Oct-20162.6 KiB11034

README

1List::Regexp module
2===================
3
4The module provides a function that builds a regular expression that will
5match any string from the input list of strings.  The generated expression
6is much more efficient than the equivalent regexp obtained by mere
7concatenation of all strings from the list with a '|' as separator.
8
9Three kinds of regular expressions can be generated: Perl regexps (the
10default), POSIX extended, and Emacs-style.
11
12Additionally, the generated regexp can be restricted to match whole words
13only, or words appearing on a line alone.
14
15The module is inspired by the GNU Emacs regexp-opt function.
16
17Example of its usage:
18
19  use List::Regexp;
20  my $rx = regexp_opt(@strings);
21  .
22  .
23  .
24  if ($input =~ qr/$rx/) {
25    .
26    .
27    .
28  }
29
30regexp-opt utility
31==================
32
33This utilitiy offers a command line interface to the module.  It collects
34its arguments and prints out a regular expression that will match any of
35them.  E.g.:
36
37  $ regexp-opt --word string test stringent
38  \<(string(ent)?|test)\>
39
40Copying
41=======
42This package is free software; you can redistribute it and/or modify
43it under the terms of the GNU General Public License as published by
44the Free Software Foundation; either version 3, or (at your option)
45any later version.
46
47See http://www.gnu.org/licenses.
48
49