README.md (10525B)
1 <!-- 2 3 @license Apache-2.0 4 5 Copyright (c) 2018 The Stdlib Authors. 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18 19 --> 20 21 # Regular Expressions 22 23 [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] [![dependencies][dependencies-image]][dependencies-url] 24 25 > Standard library regular expressions. 26 27 <section class="installation"> 28 29 ## Installation 30 31 ```bash 32 npm install @stdlib/regexp 33 ``` 34 35 </section> 36 37 <section class="usage"> 38 39 ## Usage 40 41 ```javascript 42 var regexp = require( '@stdlib/regexp' ); 43 ``` 44 45 #### regexp 46 47 Standard library regular expressions. 48 49 ```javascript 50 var re = regexp; 51 // returns {...} 52 ``` 53 54 The following regular expressions are currently exported: 55 56 <!-- <toc pattern="*"> --> 57 58 <div class="namespace-toc"> 59 60 - <span class="signature">[`reBasenamePosix()`][@stdlib/regexp/basename-posix]</span><span class="delimiter">: </span><span class="description">regular expression to capture the last part of a POSIX path.</span> 61 - <span class="signature">[`reBasenameWindows()`][@stdlib/regexp/basename-windows]</span><span class="delimiter">: </span><span class="description">regular expression to capture the last part of a Windows path.</span> 62 - <span class="signature">[`reBasename( [platform] )`][@stdlib/regexp/basename]</span><span class="delimiter">: </span><span class="description">regular expression to capture the last part of a path.</span> 63 - <span class="signature">[`reColorHexadecimal( [mode] )`][@stdlib/regexp/color-hexadecimal]</span><span class="delimiter">: </span><span class="description">regular expression to match a hexadecimal color.</span> 64 - <span class="signature">[`reDecimalNumber( [options] )`][@stdlib/regexp/decimal-number]</span><span class="delimiter">: </span><span class="description">regular expression to match a decimal number.</span> 65 - <span class="signature">[`reDirnamePosix()`][@stdlib/regexp/dirname-posix]</span><span class="delimiter">: </span><span class="description">regular expression to capture a POSIX path dirname.</span> 66 - <span class="signature">[`reDirnameWindows()`][@stdlib/regexp/dirname-windows]</span><span class="delimiter">: </span><span class="description">regular expression to capture a Windows path dirname.</span> 67 - <span class="signature">[`reDirname( [platform] )`][@stdlib/regexp/dirname]</span><span class="delimiter">: </span><span class="description">regular expression to capture a path dirname.</span> 68 - <span class="signature">[`reEOL( [options] )`][@stdlib/regexp/eol]</span><span class="delimiter">: </span><span class="description">regular expression to match a newline character sequence.</span> 69 - <span class="signature">[`reExtendedLengthPath()`][@stdlib/regexp/extended-length-path]</span><span class="delimiter">: </span><span class="description">regular expression to detect an extended-length path.</span> 70 - <span class="signature">[`reExtnamePosix()`][@stdlib/regexp/extname-posix]</span><span class="delimiter">: </span><span class="description">regular expression to capture a POSIX filename extension.</span> 71 - <span class="signature">[`reExtnameWindows()`][@stdlib/regexp/extname-windows]</span><span class="delimiter">: </span><span class="description">regular expression to capture a Windows filename extension.</span> 72 - <span class="signature">[`reExtname( [platform] )`][@stdlib/regexp/extname]</span><span class="delimiter">: </span><span class="description">regular expression to capture a filename extension.</span> 73 - <span class="signature">[`reFilenamePosix()`][@stdlib/regexp/filename-posix]</span><span class="delimiter">: </span><span class="description">regular expression to split a POSIX filename.</span> 74 - <span class="signature">[`reFilenameWindows()`][@stdlib/regexp/filename-windows]</span><span class="delimiter">: </span><span class="description">regular expression to split a Windows filename.</span> 75 - <span class="signature">[`reFilename( [platform] )`][@stdlib/regexp/filename]</span><span class="delimiter">: </span><span class="description">regular expression to split a filename.</span> 76 - <span class="signature">[`reFunctionName`][@stdlib/regexp/function-name]</span><span class="delimiter">: </span><span class="description">regular expression to capture a function name.</span> 77 - <span class="signature">[`reNativeFunction()`][@stdlib/regexp/native-function]</span><span class="delimiter">: </span><span class="description">regular expression to match a native function.</span> 78 - <span class="signature">[`reRegExp()`][@stdlib/regexp/regexp]</span><span class="delimiter">: </span><span class="description">regular expression to parse a regular expression string.</span> 79 - <span class="signature">[`reUncPath()`][@stdlib/regexp/unc-path]</span><span class="delimiter">: </span><span class="description">regular expression to parse a UNC path.</span> 80 - <span class="signature">[`reUtf16SurrogatePair()`][@stdlib/regexp/utf16-surrogate-pair]</span><span class="delimiter">: </span><span class="description">regular expression to match a UTF-16 surrogate pair.</span> 81 - <span class="signature">[`reUtf16UnpairedSurrogate()`][@stdlib/regexp/utf16-unpaired-surrogate]</span><span class="delimiter">: </span><span class="description">regular expression to match an unpaired UTF-16 surrogate.</span> 82 - <span class="signature">[`reWhitespace( [options] )`][@stdlib/regexp/whitespace]</span><span class="delimiter">: </span><span class="description">regular expression to match a white space character.</span> 83 84 </div> 85 86 <!-- </toc> --> 87 88 <!-- /.usage --> 89 90 <section class="examples"> 91 92 ## Examples 93 94 <!-- TODO: better examples --> 95 96 <!-- eslint no-undef: "error" --> 97 98 ```javascript 99 var objectKeys = require( '@stdlib/utils/keys' ); 100 var regexp = require( '@stdlib/regexp' ); 101 102 console.log( objectKeys( regexp ) ); 103 ``` 104 105 </section> 106 107 <!-- /.examples --> 108 109 110 <section class="main-repo" > 111 112 * * * 113 114 ## Notice 115 116 This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. 117 118 For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. 119 120 #### Community 121 122 [![Chat][chat-image]][chat-url] 123 124 --- 125 126 ## License 127 128 See [LICENSE][stdlib-license]. 129 130 131 ## Copyright 132 133 Copyright © 2016-2021. The Stdlib [Authors][stdlib-authors]. 134 135 </section> 136 137 <!-- /.stdlib --> 138 139 <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> 140 141 <section class="links"> 142 143 [npm-image]: http://img.shields.io/npm/v/@stdlib/regexp.svg 144 [npm-url]: https://npmjs.org/package/@stdlib/regexp 145 146 [test-image]: https://github.com/stdlib-js/regexp/actions/workflows/test.yml/badge.svg 147 [test-url]: https://github.com/stdlib-js/regexp/actions/workflows/test.yml 148 149 [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/regexp/main.svg 150 [coverage-url]: https://codecov.io/github/stdlib-js/regexp?branch=main 151 152 [dependencies-image]: https://img.shields.io/david/stdlib-js/regexp.svg 153 [dependencies-url]: https://david-dm.org/stdlib-js/regexp/main 154 155 [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg 156 [chat-url]: https://gitter.im/stdlib-js/stdlib/ 157 158 [stdlib]: https://github.com/stdlib-js/stdlib 159 160 [stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors 161 162 [stdlib-license]: https://raw.githubusercontent.com/stdlib-js/regexp/main/LICENSE 163 164 <!-- <toc-links> --> 165 166 [@stdlib/regexp/basename-posix]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/basename-posix 167 168 [@stdlib/regexp/basename-windows]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/basename-windows 169 170 [@stdlib/regexp/basename]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/basename 171 172 [@stdlib/regexp/color-hexadecimal]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/color-hexadecimal 173 174 [@stdlib/regexp/decimal-number]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/decimal-number 175 176 [@stdlib/regexp/dirname-posix]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/dirname-posix 177 178 [@stdlib/regexp/dirname-windows]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/dirname-windows 179 180 [@stdlib/regexp/dirname]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/dirname 181 182 [@stdlib/regexp/eol]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/eol 183 184 [@stdlib/regexp/extended-length-path]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/extended-length-path 185 186 [@stdlib/regexp/extname-posix]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/extname-posix 187 188 [@stdlib/regexp/extname-windows]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/extname-windows 189 190 [@stdlib/regexp/extname]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/extname 191 192 [@stdlib/regexp/filename-posix]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/filename-posix 193 194 [@stdlib/regexp/filename-windows]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/filename-windows 195 196 [@stdlib/regexp/filename]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/filename 197 198 [@stdlib/regexp/function-name]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/function-name 199 200 [@stdlib/regexp/native-function]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/native-function 201 202 [@stdlib/regexp/regexp]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/regexp 203 204 [@stdlib/regexp/unc-path]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/unc-path 205 206 [@stdlib/regexp/utf16-surrogate-pair]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/utf16-surrogate-pair 207 208 [@stdlib/regexp/utf16-unpaired-surrogate]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/utf16-unpaired-surrogate 209 210 [@stdlib/regexp/whitespace]: https://www.npmjs.com/package/@stdlib/regexp/tree/main/whitespace 211 212 <!-- </toc-links> --> 213 214 </section> 215 216 <!-- /.links -->