time-to-botec/js/node_modules/@stdlib/regexp/extended-length-path
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00
..
docs feat: add the node modules 2022-12-03 12:44:49 +00:00
lib feat: add the node modules 2022-12-03 12:44:49 +00:00
package.json feat: add the node modules 2022-12-03 12:44:49 +00:00
README.md feat: add the node modules 2022-12-03 12:44:49 +00:00

Extended Length Path

Regular expression to detect an extended-length path.

Usage

var reExtendedLengthPath = require( '@stdlib/regexp/extended-length-path' );

reExtendedLengthPath()

Returns a regular expression to detect an extended-length path (i.e., a Windows path which begins with the characters \\?\).

var RE = reExtendedLengthPath();
var bool = RE.test( '\\\\?\\C:\\foo\\bar' );
// returns true

Examples

var reExtendedLengthPath = require( '@stdlib/regexp/extended-length-path' );

var RE_EXTENDED_LENGTH_PATH = reExtendedLengthPath();
var bool;
var path;

path = '\\\\?\\C:\\foo\\bar';
bool = RE_EXTENDED_LENGTH_PATH.test( path );
// returns true

path = '\\\\?\\UNC\\server\\share';
bool = RE_EXTENDED_LENGTH_PATH.test( path );
// returns true

path = 'C:\\foo\\bar';
bool = RE_EXTENDED_LENGTH_PATH.test( path );
// returns false

path = '/c/foo/bar';
bool = RE_EXTENDED_LENGTH_PATH.test( path );
// returns false

path = '/foo/bar';
bool = RE_EXTENDED_LENGTH_PATH.test( path );
// returns false