Skip to content

Instantly share code, notes, and snippets.

View slott56's full-sized avatar

S.Lott slott56

View GitHub Profile
@slott56
slott56 / gist:851c9706a3f83ffdb04fb0623ab2a20f
Created July 22, 2019 01:03
Generate strings based on an RE. The resulting parse tree will be nodes. `node.generate()` should create strings that match the RE.
"""
RE-based generator.
Overview
========
See https://json-schema.org/understanding-json-schema/reference/regular_expressions.html
Also, this: http://www.ecma-international.org/ecma-262/9.0/index.html#sec-regular-expressions