regexp_trie 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGES.md +4 -0
- data/README.md +8 -4
- data/lib/regexp_trie.rb +2 -0
- data/lib/regexp_trie/version.rb +3 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c224ed8fe77a7b37a2c640fe5fc162c768e45a0c5c305e710b31a9b07e4f3efe
|
4
|
+
data.tar.gz: e3a2799dfdef72cda95ae4be4c42f51139c5b9f3c325d480af001939deb5f987
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c659358d1ee657e8c085e5ea7649b1043876db05a8e14edb9b176e67ffc1af7477813f78d00a07ed402186f82177a2dc11f670a2a1fce0e452d89aec75342b18
|
7
|
+
data.tar.gz: 217b2b2c9d9e16f2547b499668b0402ad9f542a77878c8705cacdb771900641ab24c4935fabf4611803231f1c7d79e1a2f9fef2867a63344315284ce3dc39cc7
|
data/CHANGES.md
CHANGED
data/README.md
CHANGED
@@ -22,9 +22,9 @@ See also the original [Regexp::Trie in Perl](https://metacpan.org/pod/Regexp::Tr
|
|
22
22
|
|
23
23
|
## Description
|
24
24
|
|
25
|
-
RegexpTrie takes an arbitrary number of regular expressions and assembles them into a single regular expression (or RE) that matches all that the individual REs match.
|
25
|
+
`RegexpTrie` takes an arbitrary number of regular expressions and assembles them into a single regular expression (or RE) that matches all that the individual REs match.
|
26
26
|
|
27
|
-
In other words, this library provides a limited but optimized version of `Regexp.union()
|
27
|
+
In other words, this library provides a limited but optimized version of `Regexp.union()`, even thouh there are some incompatibilities with it.
|
28
28
|
|
29
29
|
## Installation
|
30
30
|
|
@@ -34,9 +34,13 @@ Add this line to your application's Gemfile:
|
|
34
34
|
gem 'regexp_trie'
|
35
35
|
```
|
36
36
|
|
37
|
-
##
|
37
|
+
## Incompatibilities with the built-in `Regexp.union()`
|
38
38
|
|
39
|
-
|
39
|
+
* `RegexpTrie` handles only literals. i.e. `RegexpTrie.union("foo.*bar")` produces `/foo\.\*bar/`, not `/foo.*bar/`
|
40
|
+
* `RegexpTrie` cannot handle empty strings.
|
41
|
+
* The order of words does not matter:
|
42
|
+
* `Regexp.union("foo", "foobar").match("foobar") # => #<MatchData "foo">`
|
43
|
+
* `RegexpTrie.union("foo", "foobar").match("foobar") # => #<MatchData "foobar">`
|
40
44
|
|
41
45
|
## Development
|
42
46
|
|
data/lib/regexp_trie.rb
CHANGED
data/lib/regexp_trie/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: regexp_trie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- FUJI Goro (gfx)
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
125
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.
|
126
|
+
rubygems_version: 2.7.6
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: Optimized Regexp builder with Trie
|