Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e5ef61d

Browse files
committed
refers to incompatibilities with Regexp.union()
1 parent 38712a7 commit e5ef61d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,13 @@ Add this line to your application's Gemfile:
3434
gem 'regexp_trie'
3535
```
3636

37-
## Known Issues
37+
## Incompatibilities with the built-in `Regexp.union()`
3838

39-
This is not perfectly compatible with `Regexp.union()`.
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">`
4044

4145
## Development
4246

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /