1Regexp::Trie(3)       User Contributed Perl Documentation      Regexp::Trie(3)
2
3
4

NAME

6       Regexp::Trie - builds trie-ized regexp
7

SYNOPSIS

9         use Regexp::Trie;
10         my $rt = Regexp::Trie->new;
11         for (qw/foobar fooxar foozap fooza/){
12           $rt->add($_);
13         }
14         print $rt->regexp, "\n" # (?-xism:foo(?:bar|xar|zap?))
15

DESCRIPTION

17       This module is a faster but simpler version of Regexp::Assemble or
18       Regexp::Optimizer.  It builds a trie-ized regexp as above.
19
20       This module is faster than Regexp::Assemble but you can only add
21       literals.  "a+b" is treated as "a\+b", not "more than one a's followed
22       by b".
23
24       I wrote this module because I needed something faster than
25       Regexp::Assemble and Regexp::Optimizer.  If you need more minute
26       control, use those instead.
27

TIPS

29       See t/dict2rx.pl to find how to convert a big dictionary into a single
30       regexp that can be later loaded as:
31
32         my $rx = do 'dict.rx';
33
34   EXPORT
35       None.
36

SEE ALSO

38       Regexp::Optimizer,  Regexp::Assemble, Regex::PreSuf
39

AUTHOR

41       Dan Kogai, <dankogai@dan.co.jp>
42
44       Copyright (C) 2006 by Dan Kogai
45
46       This library is free software; you can redistribute it and/or modify it
47       under the same terms as Perl itself, either Perl version 5.8.8 or, at
48       your option, any later version of Perl 5 you may have available.
49
50
51
52perl v5.32.0                      2020-07-28                   Regexp::Trie(3)
Impressum