Sketch-Driven Regular Expression Generation from Natural Language and Examples
Not on the map. Why?
Abstract (arXiv)
Recent systems for converting natural language descriptions into regular expressions (regexes) have achieved some success, but typically deal with short, formulaic text and can only produce simple regexes. Realworld regexes are complex, hard to describe with brief sentences, and sometimes require examples to fully convey the user's intent. We present a framework for regex synthesis in this setting where both natural language (NL) and examples are available. First, a semantic parser (either grammar-based or neural) maps the natural language description into an intermediate sketch, which is an incomplete regex containing holes to denote missing components. Then a program synthesizer searches over the regex space defined by the sketch and finds a regex that is consistent with the given string examples. Our semantic parser can be trained purely from weak supervision based on correctness of the synthesized regex, or it can leverage heuristically-derived sketches. We evaluate on two prior datasets (Kushman and Barzilay, 2013; Locascio et al., 2016) and a real-world dataset from Stack Overflow. Our system achieves state-of-the-art performance on the prior datasets and solves 57% of the real-world dataset, which existing neural systems completely fail on.
Key facts. Cited by 10 papers in the map (data through 13 Oct 2026). First posted on arXiv 16 Aug 2019.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 2; 2022: 3; 2023: 1; 2024: 0; 2025: 3; 2026: 1.
10 papers.
- 2021RnG-KBQA: Generation Augmented Iterative Ranking for Knowledge Base Question Answeringcited by 86
- 2022Recent Advances in Text-to-SQL: A Survey of What We Have and What We Expectcited by 47
- 2025LLM-JEPA: Large Language Models Meet Joint Embedding Predictive Architecturescited by 38
- 2022Formal Specifications from Natural Languagecited by 33
- 2022Uni-Parser: Unified Semantic Parser for Question Answering on Knowledge Base and Databasecited by 16
- 2023InfeRE: Step-by-Step Regex Generation via Chain of Inferencecited by 5
- 2025An Evaluation Study of Hybrid Methods for Multilingual PII Detectioncited by 2
- 2021Regular Expressions for Fast-response COVID-19 Text Classificationcited by 0
- 2025Lost in Translation? Converting RegExes for Log Parsing into Dynatrace Pattern Languagecited by 0
- 2026Domain Agnostic Text Redaction from Natural Language Rules using Instruction Tuningcited by 0
- 2026Domain Agnostic Text Redaction from Natural Language Rules using Instruction Tuning9 Aug 2026
- 2025An Evaluation Study of Hybrid Methods for Multilingual PII Detection8 Oct 2025
- 2025LLM-JEPA: Large Language Models Meet Joint Embedding Predictive Architectures11 Sep 2025
- 2025Lost in Translation? Converting RegExes for Log Parsing into Dynatrace Pattern Language24 Jun 2025
- 2023InfeRE: Step-by-Step Regex Generation via Chain of Inference8 Aug 2023
- 2022Uni-Parser: Unified Semantic Parser for Question Answering on Knowledge Base and Database9 Nov 2022
- 2022Recent Advances in Text-to-SQL: A Survey of What We Have and What We Expect22 Aug 2022
- 2022Formal Specifications from Natural Language4 Jun 2022
- 2021RnG-KBQA: Generation Augmented Iterative Ranking for Knowledge Base Question Answering17 Sep 2021
- 2021Regular Expressions for Fast-response COVID-19 Text Classification18 Feb 2021