regexp_trie 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/example/synopsis.rb DELETED
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'regexp_trie'
3
-
4
- # like Regexp.union()
5
- p RegexpTrie.union(%w(foobar fooxar foozap fooza)) # /foo(?:bar|xar|zap?)/
6
- p RegexpTrie.union(%w(foobar fooxar foozap fooza), option: Regexp::IGNORECASE) # /foo(?:bar|xar|zap?)/i
7
-
8
- # or object-oriented interface
9
- rt = RegexpTrie.new
10
- %w(foobar fooxar foozap fooza).each do |word|
11
- rt.add(word)
12
- end
13
- p rt.to_regexp # /foo(?:bar|xar|zap?)/