Package Exports
- mentions-regex
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mentions-regex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
100% twitter compatible
@mentionsregex! Regular expression for matching@usernamementions, as used on twitter, facebook, github, etc.
Install
npm i --save mentions-regex
npm testmentionsRegex
Compatible twitter mentions regex, not only of course!
[dot]{Boolean} iftrueit will allow to match dotsreturn{RegExp}
Usage
For more use-cases see tests
var mentionsRegex = require('mentions-regex');
mentionsRegex().test('foo @bar baz');
//=> true
mentionsRegex().exec('foo @bar baz')[1];
//=> 'bar'
mentionsRegex().test('foo email@bar.com baz');
//=> false
mentionsRegex(true).test('foo email@bar.com baz');
//=> false
mentionsRegex(true).test('foo @bar.com baz');
//=> true
mentionsRegex(true).exec('foo @bar.com baz')[1];
//=> 'bar.com'Related
- abbrev-kindof:
kind-ofwith single letter abbreviations to javascript native types, likekindof(val, 'soa')will return true ifvalis string, object or array. - copyright-regex: Regex for matching and parsing copyright statements.
- dirname-regex: Regular expression for matching the directory part of a file path.
- glob-path-regex: Regular expression for matching the parts of glob pattern.
- regexify: Regex everything!
Author
Charlike Mike Reagent
License 
Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
Released under the MIT license.
Proudly generated by docks(1) on May 4, 2015