# Help with Regex Expression Parsing

**URL:** https://discuss.codemirror.net/t/help-with-regex-expression-parsing/8030
**Category:** Lezer
**Created:** [March 23, 2024, 3:16am UTC](https://discuss.codemirror.net/t/help-with-regex-expression-parsing/8030 "2024-03-23T03:16:12Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![AlexErrant](https://discuss.codemirror.net/user_avatar/discuss.codemirror.net/alexerrant/32/4287_2.png) [@AlexErrant](https://discuss.codemirror.net/u/AlexErrant)
#### Post date: [March 24, 2024, 5:29pm UTC](https://discuss.codemirror.net/t/help-with-regex-expression-parsing/8030/2 "2024-03-24T17:29:45Z")

</div>

I did a casual search for this a few days ago, but didn’t come up with much. The closest I saw was [Regexr](https://github.com/gskinner/regexr) which uses CodeMirror v5, but not Lezer. Regex101 uses CodeMirror too but isn’t open source. [Searching github for `regex.grammar`](https://github.com/search?q=path%3Aregex.grammar&type=code&ref=advsearch) and its variants didn’t yield much, and afaik gitlab doesn’t support file global search.

So I went with [what’s in Javascript](https://github.com/lezer-parser/javascript/blob/392c6115647c9e55c147ac2d702f75be127a7b2d/src/javascript.grammar#L683) and called it good. Some reasoning for it is given at the bottom of [this article](https://lezer.codemirror.net/examples/javascript/).

Note that grammar [is more interested in tokenization than correctness](https://github.com/lezer-parser/javascript/pull/31).

Please LMK if you find/build something better 🙂

Also FWIW I use [a clipboard manager](https://ditto-cp.sourceforge.io/) and have a habit of copying things, so even if my browser/computer crashes or whatever I won’t lose literally everything. I used to use a Chrome extension for form recovery, but it no longer works. Maybe I should try to find another; haven’t bothered.

---

_[View the full topic](https://discuss.codemirror.net/t/help-with-regex-expression-parsing/8030)._
