https://github.com/jonschlinkert/author-regex
Regular expression for parsing an `author` string into an object following npm conventions.
https://github.com/jonschlinkert/author-regex
contributor maintainer parsing person regex regular-expression somebody
Last synced: about 2 months ago
JSON representation
Regular expression for parsing an `author` string into an object following npm conventions.
- Host: GitHub
- URL: https://github.com/jonschlinkert/author-regex
- Owner: jonschlinkert
- License: mit
- Created: 2014-09-30T01:25:03.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-08T10:10:06.000Z (over 8 years ago)
- Last Synced: 2025-05-06T21:06:55.833Z (about 2 months ago)
- Topics: contributor, maintainer, parsing, person, regex, regular-expression, somebody
- Language: JavaScript
- Size: 7.81 KB
- Stars: 13
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# author-regex [](http://badge.fury.io/js/author-regex)
> Regular expression for parsing an `author` string into an object following npm conventions.
This the regex used by [parse-authors](https://github.com/jonschlinkert/parse-authors).
**Related**
- [parse-author](https://github.com/jonschlinkert/parse-author)
- [parse-authors](https://github.com/jonschlinkert/parse-authors)## Install
#### Install with [npm](npmjs.org)```bash
npm i author-regex --save
```
#### Install with [bower](https://github.com/bower/bower)```bash
bower install author-regex --save
```## Tests
Run
```bash
npm test
```## Usage
```js
var re = require('author-regex');function authors(str) {
return re().exec(str);
}
console.log(author('Jon Schlinkert (https://github.com/jonschlinkert)'));
```
Returns:```js
[ 'Jon Schlinkert (https://github.com/jonschlinkert)',
'Jon Schlinkert',
'[email protected]',
'https://github.com/jonschlinkert',
index: 0,
input: 'Jon Schlinkert (https://github.com/jonschlinkert)' ]
```## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)## License
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 29, 2014._