Microdeck.tools 100% 瀏覽器本地執行

正規表達式 (Regex) 測試器、除錯器與速查表

New

測試 JavaScript 正規表達式,具備即時符合醒目提示、擷取群組、取代預覽以及逐步 Token 解析與速查手冊。

100% 瀏覽器本地執行 不上傳至伺服器 即時顯示結果
//g

Matches highlighted · 2 found

Order 2026-03-14: 3 items, total $45.50
Order 2026-04-02: 1 item, total $9.99
Contact: sales@example.com, support@example.org
#MatchPositionGroups
12026-03-146–16$1 = "2026" · $2 = "03" · $3 = "14" · year = "2026"
22026-04-0246–56$1 = "2026" · $2 = "04" · $3 = "02" · year = "2026"
Order 2026/03/14: 3 items, total $45.50
Order 2026/04/02: 1 item, total $9.99
Contact: sales@example.com, support@example.org

What the pattern means

  • (?<year> start of the capture group named year
  • \d a digit
  • {4} exactly 4 times
  • ) end of group
  • - the character -
  • ( start of a capture group
  • \d a digit
  • {2} exactly 2 times
  • ) end of group
  • - the character -
  • ( start of a capture group
  • \d a digit
  • {2} exactly 2 times
  • ) end of group
Cheat sheet
\d \w \sdigit, word character, whitespace\d{3}-\d{4}
. [abc] [^abc]any character, one of, none of[A-Z][a-z]+
* + ? {n,m}repeat counts (add ? for lazy)a{2,4}?
^ $ \bstart, end, word boundary\bcat\b
(…) (?:…) (?<n>…)capture, non-capture, named group(?<year>\d{4})
(?=…) (?!…) (?<=…) (?<!…)lookahead and lookbehind(?<=\$)\d+
\1 \k<n>repeat a captured group(\w)\1
$1 $<n> $&use in the replacement text$<year>-$1

Uses your browser’s JavaScript regular expressions. Other languages (PCRE, Python, .NET) differ in lookbehind, named groups and flags. Patterns that backtrack heavily on long text can freeze a tab; the text is limited to 200,000 characters.

這個工具替您省下寶貴時間了嗎? 歡迎自願贊助,協助 Microdeck 維持免費與穩定運作 · 最低 $3 起。

底層運作原理

Type a pattern, switch flags on and off and paste test text. Matches are highlighted and listed with their groups.

詳細操作步驟

1

Type the pattern.

2

Paste test text.

3

Read matches, groups and the explanation.

核心功能與效能優勢

  • Live highlighting
  • Capture and named groups
  • Replace preview
  • Token explanation
  • Cheat sheet

運算方法、公式與技術標準

The pattern runs with the JavaScript RegExp engine of your browser, with a limit of 1,000 matches and 200,000 characters.

實作範例與邊界案例

(?<year>\d{4})-(\d{2})

輸入
Match
輸出
2026-03 with year = 2026

使用限制與精準度說明

  • • JavaScript syntax only; PCRE, Python and .NET differ.
  • • Heavy backtracking on long text can slow the tab.

瀏覽器本地運算與隱私保障

傳統線上轉換網站會將您的文件、文字片段或影音檔案上傳至遠端伺服器。正規表達式 (Regex) 測試器、除錯器與速查表 完全在您的瀏覽器分頁內運行:

於此分頁本地處理

您的檔案與文字都在裝置本機計算,不會傳送內容至任何後端伺服器。

絕不記錄操作內容

Microdeck 不會記錄或儲存您在工具內貼上的任何檔案或程式碼。

分頁記憶體即時釋放

所有暫存結果僅存在目前分頁記憶體中,重設或關閉分頁後即刻清除。

常見問題 (FAQ)

Why does my pattern work here but not in Python?

Flags, lookbehind support and named group syntax differ between engines.

Is anything uploaded?

No. Everything runs in your browser and your data stays on your device.

探索相關微型工具

支持 Microdeck

完全自願 · $3 起 · 免註冊帳號

選擇金額 (USD):已選金額:$5

單次最低贊助金額為 $3 USD。

完全自願 · $3 起 · 將透過 Gumroad 安全結帳頁面完成。