VS Code Extensions
Regex Translator

Regex Translator

by pabarrher

Hover a regex in Python, Java, JavaScript or TypeScript to see a natural-language explanation and an example match.

Downloads

24

Rating

5.0 / 5 (1)

Version

1.0.1

Last updated

May 16, 2026

Understand regular expressions instantly with inline hover explanations in VS Code.

Regex Translator translates complex regex patterns into clear, natural language descriptions. Hover over any regular expression to see a detailed explanation, component breakdown, and generated matching examples.

Features

  • Natural Language Explanations — Hover over a regex to get a human-readable description of what it matches
  • Token Analysis — View detailed breakdown of each regex component
  • Pattern Examples — Automatically generates example strings that match your pattern
  • Multi-Language Support — Explanations available in English and Spanish
  • Pattern Detection — Works with regex literals, string patterns, and standard regex function calls

Supported Languages

  • JavaScript: Regex literals and RegExp, match, replace, split, search methods
  • TypeScript: Full support for JavaScript regex patterns
  • Python: re.compile, re.match, re.search, re.fullmatch, re.findall, re.sub
  • Java: Pattern.compile and .matches methods

Usage

  1. Open a JavaScript, TypeScript, Python, or Java file
  2. Hover your cursor over a regular expression
  3. The explanation, token breakdown, and examples appear instantly

Example

const email = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;

Hovering displays:

  • Pattern description: matches standard email address format
  • Tokens: character classes, quantifiers, anchors
  • Example match: [email protected]

Configuration

Access Settings → Regex Translator to select your preferred language:

  • English (default)
  • Spanish

Requirements

  • VS Code 1.120.0 or higher

Issues and Feedback

Report bugs or request features at github.com/pabloarrabalh/regex-translator

License

MIT

Related extensions