Skip to content

Commit 568933c

Browse files
committed
docs: added note about limitations
1 parent 84bb6dc commit 568933c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* [Browser](#browser)
2121
* [Options](#options)
2222
* [Quick tips and migration from url-regex](#quick-tips-and-migration-from-url-regex)
23+
* [Limitations](#limitations)
2324
* [Contributors](#contributors)
2425
* [License](#license)
2526

@@ -128,6 +129,11 @@ Unlike the deprecated and unmaintained package [url-regex][], we do a few things
128129
* We added a `trailingPeriod` option, which is set to `false` by default (which means matches won't contain trailing periods, whereas [url-regex][] had this set to `true`).
129130

130131

132+
## Limitations
133+
134+
Since we cannot use regular expression's "negative lookbehinds" functionality (due to [RE2][] limitations), we could not merge the logic from this [pull request](https://github.com/kevva/url-regex/pull/67/commits/6c31d81c35c3bb72c413c6e4af92a37b2689ead2). This would have allowed us to make it so `example.jpeg` would match only if it was `example.jp`, however if you pass `example.jpeg` right now it will extract `example.jp` from it (since `.jp` is a TLD). An alternative solution may exist, and we welcome community contributions regarding this issue.
135+
136+
131137
## Contributors
132138

133139
| Name | Website |

0 commit comments

Comments
 (0)