GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Regexp::Trie(3) User Contributed Perl Documentation Regexp::Trie(3)

Regexp::Trie - builds trie-ized regexp

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

This module is a faster but simpler version of Regexp::Assemble or Regexp::Optimizer. It builds a trie-ized regexp as above.

This module is faster than Regexp::Assemble but you can only add literals. "a+b" is treated as "a\+b", not "more than one a's followed by b".

I wrote this module because I needed something faster than Regexp::Assemble and Regexp::Optimizer. If you need more minute control, use those instead.

See t/dict2rx.pl to find how to convert a big dictionary into a single regexp that can be later loaded as:

  my $rx = do 'dict.rx';

None.

Regexp::Optimizer, Regexp::Assemble, Regex::PreSuf

Dan Kogai, <dankogai@dan.co.jp>

Copyright (C) 2006 by Dan Kogai

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

2006-04-27 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.