{"id":19361750,"url":"https://github.com/bluelovers/regexp-support","last_synced_at":"2026-05-13T13:41:33.309Z","repository":{"id":57352352,"uuid":"131119307","full_name":"bluelovers/regexp-support","owner":"bluelovers","description":"check RegExp ( regular expressions ) support","archived":false,"fork":false,"pushed_at":"2019-06-03T10:25:12.000Z","size":208,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-06T19:48:10.915Z","etag":null,"topics":["nodejs","regex","regexp","regular-expression"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bluelovers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-26T07:46:38.000Z","updated_at":"2019-06-03T10:25:14.000Z","dependencies_parsed_at":"2022-09-19T03:51:48.263Z","dependency_job_id":null,"html_url":"https://github.com/bluelovers/regexp-support","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluelovers%2Fregexp-support","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluelovers%2Fregexp-support/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluelovers%2Fregexp-support/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluelovers%2Fregexp-support/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluelovers","download_url":"https://codeload.github.com/bluelovers/regexp-support/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240479799,"owners_count":19808125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nodejs","regex","regexp","regular-expression"],"created_at":"2024-11-10T07:25:15.893Z","updated_at":"2026-05-13T13:41:28.265Z","avatar_url":"https://github.com/bluelovers.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# regexp-support\n\n    check RegExp ( regular expressions ) support\n\n## install\n\n```nodemon\nnpm install regexp-support\n```\n\n[version test log](test/log)\n\n## Api\n\nallow u check support on other RegExp base class\n\n```ts\nhasSupportFlag(flag: string, RegExpClass?: typeof RegExp, skipPatternCheck?: boolean): boolean\ntestFlag(flag: string, RegExpClass?: typeof RegExp, flagsPattern?): boolean\n```\n\n`RegExpClass` can be Object with `create`, for some class can't create by `new`\n\n```ts\nexport interface ICreateRegExp\n{\n\tcreate(pattern: string, flag?: string, ...argv)\n}\n```\n\n## demo\n\n```ts\nimport support from 'regexp-support';\n\nconsole.log(support);\n```\n\n## todo\n\n* need more test on unicode set [unicode.ts](lib/pattern/charset/unicode.ts) , [unicode-script.ts](lib/pattern/charset/unicode-script.ts)\n\n### desc\n\n#### lookAheadPositive, lookAheadNegative\n\n* `aa(?=bb)`\n* `aa(?!bb)`\n\n#### lookBehindPositive\n\n* `(?\u003c=\\$)foo`\n\n```ts\nconst RE_DOLLAR_PREFIX = /(?\u003c=\\$)foo/g;\n'$foo %foo foo'.replace(RE_DOLLAR_PREFIX, 'bar'); // =\u003e '$bar %foo foo'\n```\n\n#### lookBehindNegative\n\n* `(?\u003c!\\$)foo`\n\n```ts\nconst RE_NO_DOLLAR_PREFIX = /(?\u003c!\\$)foo/g;\n'$foo %foo foo'.replace(RE_NO_DOLLAR_PREFIX, 'bar'); // =\u003e '$foo %bar bar'\n```\n\n### node.js 10\n\n```ts\n{ nativeFlags: 'gimsuy',\n  flags: \n   { multiline: true,\n     m: true,\n     global: true,\n     g: true,\n     ignoreCase: true,\n     i: true,\n     sticky: true,\n     y: true,\n     unicode: true,\n     u: true,\n     dotAll: true,\n     s: true,\n     freeSpacing: false,\n     x: false,\n     n: false },\n  flagsAll: { g: true, i: true, m: true, s: true, u: true, y: true },\n  pattern: \n   { namedCapturingGroups: true,\n     namedCapturingGroupsUnicode: true,\n     namedCapturingGroupsEmoji: false,\n     namedCapturingGroupsBackreference: true,\n     namedCapturingGroupsDuplicate: false,\n     lookAheadPositive: true,\n     lookAheadNegative: true,\n     lookBehindPositive: true,\n     lookBehindNegative: true,\n     dotUnicodeEmoji: true,\n     classSub: false },\n  prototype: \n   { source: true,\n     flags: true,\n     lastIndex: true,\n     dotAll: true,\n     global: true,\n     ignoreCase: true,\n     multiline: true,\n     sticky: true,\n     unicode: true },\n  static: \n   { '$1': true,\n     '$2': true,\n     '$3': true,\n     '$4': true,\n     '$5': true,\n     '$6': true,\n     '$7': true,\n     '$8': true,\n     '$9': true,\n     input: true,\n     '$_': true,\n     lastMatch: true,\n     '$\u0026': true,\n     lastParen: true,\n     '$+': true,\n     leftContext: true,\n     '$`': true,\n     rightContext: true,\n     '$\\'': true,\n     '$10': false,\n     '$100': false },\n  symbol: \n   { species: false,\n     match: true,\n     replace: true,\n     search: true,\n     split: true },\n  objectStringTag: '[object RegExp]',\n  unicodeSet: \n   { unicode: true,\n     script: true,\n     blocks: false,\n     unicodeTest: \n      { C: true,\n        Other: true,\n        Cc: true,\n        Control: true,\n        Cs: true,\n        Surrogate: true,\n        L: true,\n        Letter: true,\n        LC: true,\n        Cased_Letter: true,\n        Ll: true,\n        Lowercase_Letter: true,\n        Lo: true,\n        Other_Letter: true,\n        Lu: true,\n        Uppercase_Letter: true,\n        M: true,\n        Mark: true,\n        Me: true,\n        Enclosing_Mark: true,\n        Mn: true,\n        Nonspacing_Mark: true,\n        N: true,\n        Number: true,\n        Nd: true,\n        Decimal_Number: true,\n        Nl: true,\n        Letter_Number: true,\n        No: true,\n        Other_Number: true,\n        P: true,\n        Punctuation: true,\n        Pc: true,\n        Connector_Punctuation: true,\n        Pd: true,\n        Dash_Punctuation: true,\n        Pe: true,\n        Close_Punctuation: true,\n        Pf: true,\n        Final_Punctuation: true,\n        Pi: true,\n        Initial_Punctuation: true,\n        Po: true,\n        Other_Punctuation: true,\n        Ps: true,\n        Open_Punctuation: true,\n        S: true,\n        Symbol: true,\n        Sc: true,\n        Currency_Symbol: true,\n        Sk: true,\n        Modifier_Symbol: true,\n        Sm: true,\n        Math_Symbol: true,\n        So: true,\n        Other_Symbol: true,\n        Z: true,\n        Separator: true,\n        Zl: true,\n        Line_Separator: true,\n        Zp: true,\n        Paragraph_Separator: true,\n        Zs: true,\n        Space_Separator: true,\n        ASCII: true,\n        Alphabetic: true,\n        Any: true,\n        White_Space: true,\n        Alpha: true,\n        Emoji: true,\n        Emoji_Component: true,\n        Emoji_Modifier: true,\n        Emoji_Presentation: true,\n        Ideographic: true,\n        Ideo: true,\n        Lower: true,\n        Quotation_Mark: true,\n        QMark: true,\n        Unified_Ideograph: true,\n        Upper: true,\n        Combining_Mark: true,\n        punct: true,\n        Digit: false,\n        Alnum: false,\n        Punct: false,\n        Graph: false,\n        Blank: false,\n        Cntrl: false,\n        XDigit: false,\n        Space: false,\n        Decimal_Digit_Number: false },\n     scriptTest: \n      { Arabic: true,\n        Bengali: true,\n        Common: true,\n        Coptic: true,\n        Cyrillic: true,\n        Ethiopic: true,\n        Georgian: true,\n        Greek: true,\n        Han: true,\n        Hangul: true,\n        Hiragana: true,\n        Katakana: true,\n        Latin: true,\n        Tamil: true,\n        Tibetan: true,\n        Arab: true,\n        Beng: true,\n        Copt: true,\n        Cyrl: true,\n        Ethi: true,\n        Geor: true,\n        Grek: true,\n        Hani: true,\n        Hira: true,\n        Kana: true,\n        Latn: true,\n        Taml: true,\n        Tibt: true },\n     blocksTest: { InBasic_Latin: false } } }\n```\n\n### node.js 9\n\n\u003e by test on RunKit\n\n```ts\n{ flags: \n   { multiline: true,\n     m: true,\n     global: true,\n     g: true,\n     ignoreCase: true,\n     i: true,\n     sticky: true,\n     y: true,\n     unicode: true,\n     u: true,\n     dotAll: true,\n     s: true,\n     freeSpacing: false,\n     x: false,\n     n: false },\n  flagsAll: { g: true, i: true, m: true, s: true, u: true, y: true },\n  pattern: \n   { namedCapturingGroups: false,\n     namedCapturingGroupsUnicode: false,\n     namedCapturingGroupsEmoji: false } }\n```\n\n### node.js 8\n\n\u003e by test on RunKit\n\n```ts\n{ flags: \n   { multiline: true,\n     m: true,\n     global: true,\n     g: true,\n     ignoreCase: true,\n     i: true,\n     sticky: true,\n     y: true,\n     unicode: true,\n     u: true,\n     dotAll: true,\n     s: true,\n     freeSpacing: false,\n     x: false,\n     n: false },\n  flagsAll: { g: true, i: true, m: true, s: true, u: true, y: true },\n  pattern: \n   { namedCapturingGroups: false,\n     namedCapturingGroupsUnicode: false,\n     namedCapturingGroupsEmoji: false } }\n```\n\n## link\n\n* http://2ality.com/archive.html?tag=regexp\n* http://2ality.com/2017/07/regexp-unicode-property-escapes.html\n* https://en.wikipedia.org/wiki/Unicode_character_property\n* http://www.wellho.net/regex/javare.html\n* https://zhuanlan.zhihu.com/p/33335629\n* https://github.com/Icemic/huozi.js/blob/master/lib/isCJK.js\n* https://github.com/ethantw/Han/blob/master/src/js/regex/unicode.js\n* https://github.com/tc39/proposal-regexp-unicode-property-escapes#why-not-support-the-name-property-pname\n* https://stackoverflow.com/questions/6493954/how-to-properly-write-regex-for-unicode-first-name-in-java\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluelovers%2Fregexp-support","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluelovers%2Fregexp-support","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluelovers%2Fregexp-support/lists"}