# extract_url_from_string

> ## Extract all URLs from a string

Latest version **1.0.2** (published 2022-12-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install extract_url_from_string
pnpm add extract_url_from_string
yarn add extract_url_from_string
bun add extract_url_from_string
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-12-16 |
| First published | 2022-12-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | juniodeveloper |
| Maintainers | juniodeveloper |

## Links

- npm: https://www.npmjs.com/package/extract_url_from_string
- Repository: https://github.com/juniodeveloper/extract_url_from_string
- Homepage: https://github.com/juniodeveloper/extract_url_from_string#readme
- Issues: https://github.com/juniodeveloper/extract_url_from_string/issues
- npm.io page: https://npm.io/package/extract_url_from_string

## Recent versions

- 1.0.2 (latest) — 2022-12-16
- 1.0.1 — 2022-12-16
- 1.0.0 — 2022-12-15

## README

# Extract url from string

## Extract all URLs from a string

```bash 
 npm install extract_url_from_string
 # or
 yarn add extract_url_from_string
 ```

```javascript

const extractUrl = require("extract_url_from_string");

const text =
  "Here is my text with some urls to test the first url is example.com but it also has url example.com/login or example.com?id=extractUrl";

(async () => {
  try {
    const urls = await extractUrl(text);
    /*
     URLs will return [
       "example.com",
       "example.com/login",
       "example.com?id=extractUrl"
     ]
     */
    console.log(urls);
  } catch (error) {
    console.log(error);
  }
})();


```

---
_Source: https://npm.io/package/extract_url_from_string · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
