time-to-botec/js/node_modules/@stdlib/regexp/unc-path/docs/repl.txt
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

102 lines
2.3 KiB
Plaintext

{{alias}}()
Return a regular expression to parse a UNC path.
Returns
-------
re: RegExp
Regular expression.
Examples
--------
> var RE = {{alias}}();
> var path = '\\\\server\\share\\foo\\bar\\baz:a:b';
> var bool = RE.test( path )
true
> path = '\\\\server\\share\\foo\\bar\\baz::b';
> bool = RE.test( path )
true
> path = '\\\\server\\share\\foo\\bar\\baz:a';
> bool = RE.test( path )
true
> path = '\\\\server\\share\\foo\\bar\\baz';
> bool = RE.test( path )
true
> path = '\\\\server\\share\\foo\\bar';
> bool = RE.test( path )
true
> path = '\\\\server\\share\\foo';
> bool = RE.test( path )
true
> path = '\\\\server\\share';
> bool = RE.test( path )
true
> path = '\\\\server\\\\share';
> bool = RE.test( path )
false
> path = '\\\\\\\\server\\share';
> bool = RE.test( path )
false
> path = 'beep boop \\\\server\\share';
> bool = RE.test( path )
false
> path = '\\\\server';
> bool = RE.test( path )
false
> path = '\\';
> bool = RE.test( path )
false
> path = '';
> bool = RE.test( path )
false
> path = '\\\\server\\share\\';
> bool = RE.test( path )
false
> path = '\\\\server\\share\\foo\\bar\\baz:';
> bool = RE.test( path )
false
> path = '\\\\server\\share\\foo\\bar\\baz:a:';
> bool = RE.test( path )
false
> path = '\\\\server\\share\\foo\\bar\\baz::';
> bool = RE.test( path )
false
> path = '\\\\server\\share\\foo\\bar\\baz:a:b:c';
> bool = RE.test( path )
false
> path = '\\\\server\\share\\foo\\bar\\';
> bool = RE.test( path )
false
> path = '//server/share';
> bool = RE.test( path )
false
> path = '/foo/bar';
> bool = RE.test( path )
false
> path = 'foo/bar';
> bool = RE.test( path )
false
> path = './foo/bar';
> bool = RE.test( path )
false
> path = '/foo/../bar';
> bool = RE.test( path )
false
{{alias}}.REGEXP
Regular expression to parse a UNC path.
Examples
--------
> var path = '\\\\server\\share\\foo\\bar\\baz:a:b';
> var bool = {{alias}}.REGEXP.test( path )
true
> path = '\\\\server\\share\\foo\\bar\\baz::b';
> bool = {{alias}}.REGEXP.test( path )
true
See Also
--------