uuid-regexp
RegExp for finding an RFC4122 compliant UUID in a string.
npm install uuid-regexp --save
You can also use Duo, Bower or download the files manually.
npm stats
API Examples
API
var uuid = //=> [ 'f47ac10b-58cc-4372-a567-0e02b2c3d479', index: 0, input: 'f47ac10b-58cc-4372-a567-0e02b2c3d479' ] //=> true //=> true //=> true //=> true //=> false 'Secret UUID is: {4d36e96e-e325-11ce-bfc1-08002be10318}'//=> 'Secret UUID is: {*****}'
RegExp
var regexp = regexpversionedsource//=> '[a-f0-9]{8}-?[a-f0-9]{4}-?[1-5][a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}' regexpnilsource//=> '[0]{8}-?[0]{4}-?[0]{4}-?[0]{4}-?[0]{12}'
API
uuid(options)
arguments
options.nil (Boolean)
Whether to include the nil/empty UUID pattern. (default:false
)options.flags (String)
Additional RegExp flags ('i' is always set).
returns
(RegExp)
RegExp for matching an RFC4122 compliant UUID strings.
Inspiration
Contributing
SEE: contributing.md