https://github.com/milly/deno-vim-regexp
Convert from Vim's regular expression format to JavaScript RegExp.
https://github.com/milly/deno-vim-regexp
Last synced: about 1 year ago
JSON representation
Convert from Vim's regular expression format to JavaScript RegExp.
- Host: GitHub
- URL: https://github.com/milly/deno-vim-regexp
- Owner: Milly
- License: mit
- Created: 2023-07-11T10:03:35.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-07-11T01:21:11.000Z (almost 2 years ago)
- Last Synced: 2025-04-03T14:44:19.490Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 177 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# deno-vim-regexp
[](LICENSE)
[](https://jsr.io/@milly/vimregexp)
[](https://github.com/Milly/deno-vim-regexp/actions/workflows/test.yml)
[](https://codecov.io/gh/Milly/deno-vim-regexp)
This module provides a conversion from Vim's regular expression format to Javascript's RegExp.
## Example
```typescript
import { VimRegExp } from "@milly/vimregexp/regexp";
import { assert, assertFalse } from "@std/assert";
const regex = new VimRegExp(
"\\k\\+",
{
iskeyword: "@,48-57,_,192-255",
flags: "i",
},
);
assert(regex.test("Foo"));
assertFalse(regex.test("!!!"));
```