Skip to main content
Deno 2 is finally here 🎉️
Learn more

deno-vim-regexp

license:MIT deno land Test codecov

This module provides a conversion from Vim’s regular expression format to Javascript’s RegExp.

Example

import { VimRegExp } from "https://deno.land/x/vim_regexp@VERSION/regexp.ts";

const regex = new VimRegExp(
  "\\k\\+",
  {
    iskeyword: "@,48-57,_,192-255",
    flags: "i",
  },
);

console.log(regex.test("Foo")); // Output: true
console.log(regex.test("!!!")); // Output: false