top of page

Regular Expression Generation

Convert a natural language description into a working regular expression.

Prompt detail

You are an experienced software engineer who can convert natural language descriptions into working regular expressions.

Generate a regex based on the user's description and provide a brief explanation.

User description: {{Description}}

What the prompt does

Writing regular expressions from scratch is tedious and error-prone, especially for complex pattern matching. With remio, you simply describe what you want to match in plain English — like "an email address ending in .edu" or "a phone number with optional country code" — and get a precise, working regex back instantly.

remio generates the regex pattern alongside a clear breakdown of each component, so you understand exactly how it works. No more trial-and-error on regex101 or digging through Stack Overflow threads. Just describe, generate, and implement.

When to use

• You're writing input validation for a form field and need a regex for postal codes, emails, or phone numbers in a specific format.
• You're building a log parser and need to extract timestamps, IP addresses, or error codes from unstructured log lines.
• You're setting up a CI/CD pipeline rule that triggers on specific branch naming conventions like `feature/*` or `release/v*.*.*`.
• You're refactoring legacy code and need to search-and-replace patterns across files using regex in your IDE.
• You're configuring URL rewrite rules in Nginx or Apache and need the correct capture group syntax.

Prompt examples

Input: Match a semantic version string like 2.14.1 or 0.0.1-beta, optionally followed by a hyphen and a pre-release label containing only lowercase letters

remio responds:
Here's a regex for matching semantic version strings with an optional pre-release label:

`^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-[a-z]+)?$`

Breakdown:
- `^(0|[1-9]\d*)` — Major version: zero or a positive integer with no leading zeros.
- `\.(0|[1-9]\d*)` — Minor and patch versions follow the same rule, separated by dots.
- `(-[a-z]+)?$` — An optional hyphen followed by one or more lowercase letters for the pre-release label (e.g., `-beta`, `-alpha`).

This will match `2.14.1`, `0.0.1-beta`, and `10.0.0-rc` but reject `01.2.3` or `1.2.3-Beta` (uppercase).

Tip 1:
Include specific examples of strings that should match AND strings that should be rejected. This helps remio generate a more precise regex that avoids false positives.

Tip 2:
Specify the regex flavor you need — PCRE, JavaScript, Python `re`, or POSIX — since syntax for lookaheads, named groups, and escaping varies between engines.

Tip 3:
Mention edge cases explicitly, like whether leading zeros are allowed, if the match should be case-insensitive, or if the pattern must match the entire string versus a substring.

More tips

Suited for:
Source needed:

今すぐこのプロンプトを使いましょう!

ただ remioに聞いてみてください

すべてを覚える、何も整理しない

レミオは知識に関するあらゆるニーズを満たします

詳しい機能はこちら

ウェブサイト、ローカル フォルダー、ファイルからリソースをキャプチャします。

ナレッジベース全体から、信頼できる回答を即座に取得できます。

デスクトップ、ブラウザ、モバイルで使えるアシスタント。

無制限の無料録音と文字起こし、ボットなし。

無料で始めましょう

ローカルファーストのパーソナル知識管理付きAIアシスタント

より良いAI体験のために、

remio は現在、 Windows 10+ (x64)M-Chip Mac のみをサポートしています。

bottom of page