get-urls

Get all urls in a string

npm install get-urls
1 855 downloads in the last day
29 044 downloads in the last week
58 706 downloads in the last month

get-urls Build Status

Get all urls in a string

The urls will be normalized and uniquified.

Install

Download manually or with a package-manager.

npm

npm install --save get-urls

Bower

bower install --save get-urls

Component

component install sindresorhus/get-urls

Example

var text = 'Lorem ipsum dolor sit amet, sindresorhus.com consectetuer adipiscing http://yeoman.io elit.';

getUrls(text);
//=> ['http://sindresorhus.com', 'http://yeoman.io']

CLI

You can also use it as a CLI app by installing it globally:

npm install --global get-urls

Usage

$ get-urls -h

get-urls <input-file>
or
cat <input-file> | get-urls

License

MIT © Sindre Sorhus

npm loves you