All Projects → kevva → Url Regex

kevva / Url Regex

Licence: mit
Regular expression for matching URLs

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Url Regex

Djurl
Simple yet helpful library for writing Django urls by an easy, short and intuitive way.
Stars: ✭ 85 (-70.28%)
Mutual labels:  url, regex
parse-github-url
Parse a Github URL into an object. Supports a wide variety of GitHub URL formats.
Stars: ✭ 114 (-60.14%)
Mutual labels:  url, regex
url-regex-safe
Regular expression matching for URL's. Maintained, safe, and browser-friendly version of url-regex. Resolves CVE-2020-7661 for Node.js servers.
Stars: ✭ 59 (-79.37%)
Mutual labels:  url, regex
pcre-net
PCRE.NET - Perl Compatible Regular Expressions for .NET
Stars: ✭ 114 (-60.14%)
Mutual labels:  regex
ngx-linkifyjs
Angular V8 wrapper for linkifyjs - library for finding links in plain text and converting them to HTML <a> tags via linkifyjs
Stars: ✭ 40 (-86.01%)
Mutual labels:  url
Django Multiurl
Have you ever wanted multiple views to match to the same URL? Now you can.
Stars: ✭ 268 (-6.29%)
Mutual labels:  url
Rex
Your RegEx companion.
Stars: ✭ 283 (-1.05%)
Mutual labels:  regex
Netswift
A type-safe, high-level networking solution for Swift apps
Stars: ✭ 21 (-92.66%)
Mutual labels:  url
Re Flex
The regex-centric, fast lexical analyzer generator for C++ with full Unicode support. Faster than Flex. Accepts Flex specifications. Generates reusable source code that is easy to understand. Introduces indent/dedent anchors, lazy quantifiers, functions for lex/syntax error reporting, and more. Seamlessly integrates with Bison and other parsers.
Stars: ✭ 274 (-4.2%)
Mutual labels:  regex
Frontexpress
An Express.js-Style router for the front-end
Stars: ✭ 263 (-8.04%)
Mutual labels:  url
Parse Domain
Splits a hostname into subdomains, domain and (effective) top-level domains.
Stars: ✭ 261 (-8.74%)
Mutual labels:  url
custom-permalinks
Set custom permalinks on a per-post basis in WordPress
Stars: ✭ 17 (-94.06%)
Mutual labels:  url
Kind Of
Get the native JavaScript type of a value, fast. Used by superstruct, micromatch and many others!
Stars: ✭ 268 (-6.29%)
Mutual labels:  regex
tall
Promise-based, No-dependency URL unshortner (expander) module for Node.js
Stars: ✭ 56 (-80.42%)
Mutual labels:  url
Pyregex
pyregex is a Python Regular Expression Online Tester
Stars: ✭ 282 (-1.4%)
Mutual labels:  regex
truffleHog
Searches through git repositories for high entropy strings and secrets, digging deep into commit history
Stars: ✭ 6,319 (+2109.44%)
Mutual labels:  regex
Native Url
Node's url module implemented using the built-in URL API.
Stars: ✭ 275 (-3.85%)
Mutual labels:  url
Uri
🌏 Functions for making sense out of URIs in PHP
Stars: ✭ 259 (-9.44%)
Mutual labels:  url
I Hate Regex
The code for iHateregex.io 😈 - The Regex Cheat Sheet
Stars: ✭ 3,176 (+1010.49%)
Mutual labels:  regex
Ffrouter
Powerful and easy-to-use URL routing library in iOS that supports URL Rewrite(强大、易用、支持 URL Rewrite的 iOS 路由库)
Stars: ✭ 263 (-8.04%)
Mutual labels:  url

url-regex Build Status

Regular expression for matching URLs

Based on this gist by Diego Perini.

Install

$ npm install url-regex

Usage

const urlRegex = require('url-regex');

urlRegex().test('http://github.com foo bar');
//=> true

urlRegex().test('www.github.com foo bar');
//=> true

urlRegex({exact: true}).test('http://github.com foo bar');
//=> false

urlRegex({exact: true}).test('http://github.com');
//=> true

urlRegex({strict: false}).test('github.com foo bar');
//=> true

urlRegex({exact: true, strict: false}).test('github.com');
//=> true

'foo http://github.com bar //google.com'.match(urlRegex());
//=> ['http://github.com', '//google.com']

API

urlRegex([options])

Returns a RegExp for matching URLs.

options

exact

Type: boolean
Default: false

Only match an exact string. Useful with RegExp#test to check if a string is a URL.

strict

Type: boolean
Default: true

Force URLs to start with a valid protocol or www. If set to false it'll match the TLD against a list of valid TLDs.

Related

License

MIT © Kevin Mårtensson and Diego Perini

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].