We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
xregexp
regexp/tag.ts
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small utility for combining regular expressions and strings, without worrying about escaping (#3330).
See https://xregexp.com/api/#tag and https://github.com./fromdeno/deno2node/blob/main/src/util/regexp.ts
The text was updated successfully, but these errors were encountered:
regexp/union.ts
I made a little tool like this, and I have thought about creating a PR for it. I tried to do the flags a bit more elegantly
import { regex } from "https://deno.land/x/[email protected]/string.js" import { assertEquals } from "https://deno.land/[email protected]/testing/asserts.ts" const pattern = regex`(not escaped) ${"(escaped)"} ${/(not escaped)/}`.gi assertEquals(pattern, /(not escaped) \(escaped\) (?:(not escaped))/gi ) const pattern = regex`a`.ig assertEquals(pattern, /a/gi)
If this looks good I'll clean it up with some jsdoc and type annotations
Sorry, something went wrong.
No branches or pull requests
Small utility for combining regular expressions and strings, without worrying about escaping (#3330).
See https://xregexp.com/api/#tag and https://github.com./fromdeno/deno2node/blob/main/src/util/regexp.ts
The text was updated successfully, but these errors were encountered: