url-regex
url-regex copied to clipboard
Regular expression for matching URLs
```js console.log("https://test.com/@foo.bar1baz".match(require('url-regex')({strict:true})))` ``` ``` [ 'https://test.com/@foo.bar' ] ```
Hi there! I am running into an edge case in our application where if a user inputs an incorrect email address, for example, `m.me@ff`, the library will return `m.me` as...
Thanks to that little piece of regexp code, strings like: I'am `Damian.Ga`thering is my favorite skill won't be matched
// @sindresorhus
failing test case: `background: url('http://example.com/pic.jpg');` resulted in `http://example.com/pic.jpg'` fixed #54
This happens because of the path regex that should be changed to const path = '(?:[/?#][^\\s"\']*)?';
This fixes a few cases, one of which is documented in #34: * css url's of the format `background-image:url(http://example.com/img.jpg);` * markdown url's such as `look at [my image](http://example.com/img.jpg) blah blah`
@SamVerschueren can, you, please, check this one?
Fixes #51 by adding an option to disable the HTTP Basic Authentication regex that matches on emails. It's worth noting that without the `exact` option the regex will match: `[email protected]`...
Context at #65 Didn't add typings or readme yet, want to see if this kind of API is something you'd be open to. Adds a new entry point to preserve...