# TransRegex: Multi-modal Regular Expression Synthesis by Generate-and-Repair

arXiv: https://arxiv.org/abs/2012.15489 · HTML: https://mlsanity.com/paper/2012.15489/

## Key facts

- Cited by 8 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 31 Dec 2020.

## Built on by (most cited first, 8 of 8)

- [Multi-modal Program Inference: a Marriage of Pre-trainedLanguage Models and Component-based Synthesis](https://mlsanity.com/paper/2109.02445/) (2021)
- [Search-Based Regular Expression Inference on a GPU](https://mlsanity.com/paper/2305.18575/) (2023)
- [Lyra: A Benchmark for Turducken-Style Code Generation](https://mlsanity.com/paper/2108.12144/) (2021)
- [InfeRE: Step-by-Step Regex Generation via Chain of Inference](https://mlsanity.com/paper/2308.04041/) (2023)
- [Neuro-Symbolic Regex Synthesis Framework via Neural Example Splitting](https://mlsanity.com/paper/2205.11258/) (2022)
- [A Noise-tolerant Differentiable Learning Approach for Single Occurrence Regular Expression with Interleaving](https://mlsanity.com/paper/2212.00373/) (2022)
- [Correct and Optimal: the Regular Expression Inference Challenge](https://mlsanity.com/paper/2308.07899/) (2023)
- [RuleChef: Grounding LLM Task Knowledge in Human-Editable Rules](https://mlsanity.com/paper/2607.01293/) (2026)

## Abstract (arXiv)

Since regular expressions (abbrev. regexes) are difficult to understand and compose, automatically generating regexes has been an important research problem. This paper introduces TransRegex, for automatically constructing regexes from both natural language descriptions and examples. To the best of our knowledge, TransRegex is the first to treat the NLP-and-example-based regex synthesis problem as the problem of NLP-based synthesis with regex repair. For this purpose, we present novel algorithms for both NLP-based synthesis and regex repair. We evaluate TransRegex with ten relevant state-of-the-art tools on three publicly available datasets. The evaluation results demonstrate that the accuracy of our TransRegex is 17.4%, 35.8% and 38.9% higher than that of NLP-based approaches on the three datasets, respectively. Furthermore, TransRegex can achieve higher accuracy than the state-of-the-art multi-modal techniques with 10% to 30% higher accuracy on all three datasets. The evaluation results also indicate TransRegex utilizing natural language and examples in a more effective way.
