ts-regex-builder
Version:
Maintainable regular expressions for TypeScript and JavaScript.
1 lines • 1.66 kB
Source Map (JSON)
{"version":3,"file":"anchors.mjs","names":["startOfString","precedence","pattern","endOfString","wordBoundary","nonWordBoundary","notWordBoundary"],"sources":["../../../src/constructs/anchors.ts"],"sourcesContent":["import type { EncodedRegex } from '../types';\n\n/**\n * Start of string anchor. Matches the start of of string. In `multiline` mode, also matches immediately following a newline.\n */\nexport const startOfString: EncodedRegex = {\n precedence: 'atom',\n pattern: '^',\n};\n\n/**\n * End of string anchor. Matches the end of a string. In `multiline` mode, also matches immediately preceding a newline.\n */\nexport const endOfString: EncodedRegex = {\n precedence: 'atom',\n pattern: '$',\n};\n\n/**\n * Word boundary anchor. Matches the position where one side is a word character (alphanumeric or underscore) and the other side is a non-word character (anything else).\n */\nexport const wordBoundary: EncodedRegex = {\n precedence: 'atom',\n pattern: '\\\\b',\n};\n\n/**\n * Non-word boundary anchor. Matches the position where both sides are word characters.\n */\nexport const nonWordBoundary: EncodedRegex = {\n precedence: 'atom',\n pattern: '\\\\B',\n};\n\n/**\n * @deprecated Renamed to `nonWordBoundary`.\n */\nexport const notWordBoundary = nonWordBoundary;\n"],"mappings":"AAKA,OAAO,MAAMA,aAA2B,GAAG;EACzCC,UAAU,EAAE,MAAM;EAClBC,OAAO,EAAE;AACX,CAAC;AAKD,OAAO,MAAMC,WAAyB,GAAG;EACvCF,UAAU,EAAE,MAAM;EAClBC,OAAO,EAAE;AACX,CAAC;AAKD,OAAO,MAAME,YAA0B,GAAG;EACxCH,UAAU,EAAE,MAAM;EAClBC,OAAO,EAAE;AACX,CAAC;AAKD,OAAO,MAAMG,eAA6B,GAAG;EAC3CJ,UAAU,EAAE,MAAM;EAClBC,OAAO,EAAE;AACX,CAAC;AAKD,OAAO,MAAMI,eAAe,GAAGD,eAAe","ignoreList":[]}