UNPKG

author-regex

Version:

Regular expression for parsing an `author` string into an object following npm conventions.

14 lines (10 loc) 281 B
/*! * author-regex <https://github.com/jonschlinkert/author-regex> * * Copyright (c) 2014, 2017, Jon Schlinkert. * Released under the MIT License. */ 'use strict'; module.exports = function() { return /^\s*([^<(]*?)\s*([<(]([^>)]*?)[>)])?\s*([<(]([^>)]*?)[>)])*\s*$/; };