assemblyscript-regex
                                
                                 assemblyscript-regex copied to clipboard
                                
                                    assemblyscript-regex copied to clipboard
                            
                            
                            
                        A regex engine for AssemblyScript
After updating to the latest version of Assemblyscript `0.20.1`, we ran into a couple of small type errors: ``` INFO AS210: Expression is never 'null'. return matchStr != null ?...
Hey! I couldn't run the aspect tests until I ran prettier and updated the as-pect version. This pull request is a lot bigger than I intended it to be. Sorry...
For the rather complex regex `"^((?:[+-]\\d{6}|\\d{4}))(?:-(\\d{2})-(\\d{2})|(\\d{2})(\\d{2}))(?:(?:T|\\s+)(\\d{2})(?::(\\d{2})(?::(\\d{2})(?:[.,](\\d{1,9}))?)?|(\\d{2})(?:(\\d{2})(?:[.,](\\d{1,9}))?)?)?)?(?:([zZ])|(?:([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])(?::?([0-5][0-9])(?:[.,](\\d{1,9}))?)?)?)?)(?:\\[((?:(?:\\.\\.[-A-Za-z._]{1,12}|\\.[-A-Za-z_][-A-Za-z._]{0,12}|_[-A-Za-z._]{0,13}|[a-zA-Z](?:[A-Za-z._][-A-Za-z._]{0,12})?|[a-zA-Z]-(?:[-._][-A-Za-z._]{0,11})?|[a-zA-Z]-[a-zA-Z](?:[-._][-A-Za-z._]{0,10})?|[a-zA-Z]-[a-zA-Z][a-zA-Z](?:[A-Za-z._][-A-Za-z._]{0,9})?|[a-zA-Z]-[a-zA-Z][a-zA-Z]-(?:[-._][-A-Za-z._]{0,8})?|[a-zA-Z]-[a-zA-Z][a-zA-Z]-[a-zA-Z](?:[-._][-A-Za-z._]{0,7})?|[a-zA-Z]-[a-zA-Z][a-zA-Z]-[a-zA-Z][a-zA-Z](?:[-._][-A-Za-z._]{0,6})?)(?:\\/(?:\\.[-A-Za-z_]|\\.\\.[-A-Za-z._]{1,12}|\\.[-A-Za-z_][-A-Za-z._]{0,12}|[A-Za-z_][-A-Za-z._]{0,13}))*|Etc\\/GMT[-+]\\d{1,2}|(?:[+\\u2212-][0-2][0-9](?::?[0-5][0-9](?::?[0-5][0-9](?:[.,]\\d{1,9})?)?)?)))\\])?(?:\\[u-ca-((?:[A-Za-z0-9]{3,8}(?:-[A-Za-z0-9]{3,8})*))\\])?$"`, the JS implementation when matching the string `19761118` yields the following result: ~~~ '[ "19761118", "1976", null, null, "11", "18", null, null, null, null,...
Hello! Here is the test to reproduce the issue: ```typescript it("non-capturing groups should not capture with expression", () => { const re = new RegExp("(?:^|\\s|-)\\S", "g"); const input = "hello,...
https://github.com/ColinEberhardt/assemblyscript-regex/blob/main/.prettierignore it would be good to find a fix / workaround for this.
There are a few features not yet supported (e.g. negative lookahead). It would be useful to add these to the parser, but fail visibly when converting to an NFA.
See https://github.com/ColinEberhardt/assemblyscript-regex/pull/35 I haven't taken a terribly structured approach to error handling, hence there may be cases where the error reporting is poor or the behaviour unexpected. Furthermore, the [test...
In order to ease development I'd like to always ensure that this project works equally well as TypeScript. A good way to ensure this is to ruin the unit tests...

Great article about this: https://jasonhpriestley.com/regex-dfa