0.1.1 • Published 6 years ago
@regexp-extra/unc-path v0.1.1
RegExp for matching Windows UNC path.
const UNC_PATH = require('@regexp-extra/unc-path');
// -> regular expression
UNC_PATH.test('/foo/bar');
// false
UNC_PATH.test('\\/foo/bar');
// true
new RegExp(UNC_PATH).exec('\\/foo/bar');
// [ '\\/foo/bar', index: 0, input: '\\/foo/bar', groups: undefined ]
credits: taken directly from regexhq/unc-path-regex.