Skip to content
DevToolKit

正規表達式速查表

免費正規表達式速查表——涵蓋從基礎到進階的完整指令和語法參考資源。結構化分類便於快速查詢,每個條目搭配實用範例和詳細使用說明,適合開發者日常查閱。適合專業人士與一般使用者,隨時隨地在任何裝置上使用。完全免費,無使用次數限制,不添加浮水印。介面簡潔直觀,無需任何技術背景即可輕鬆操作。

Search Reference

49 of 49 tokens
.
Any character

Matches any single character except newline (unless s flag is set).

\d
Digit

Matches any digit character (0-9). Equivalent to [0-9].

\D
Non-digit

Matches any character that is not a digit. Equivalent to [^0-9].

\w
Word character

Matches any alphanumeric character plus underscore. Equivalent to [a-zA-Z0-9_].

\W
Non-word character

Matches any character that is not a word character. Equivalent to [^a-zA-Z0-9_].

\s
Whitespace

Matches any whitespace character: space, tab, newline, carriage return, form feed.

\S
Non-whitespace

Matches any character that is not whitespace.

[abc]
Character set

Matches any one of the characters inside the brackets.

[^abc]
Negated set

Matches any character NOT inside the brackets.

[a-z]
Character range

Matches any character in the specified range (inclusive).

[a-zA-Z]
Combined range

Matches any uppercase or lowercase letter using combined ranges.

[0-9a-fA-F]
Hex digit range

Matches hexadecimal characters by combining digit and letter ranges.

^
Start of string

Matches the start of a string (or line in multiline mode).

$
End of string

Matches the end of a string (or line in multiline mode).

\b
Word boundary

Matches the position between a word character and a non-word character.

\B
Non-word boundary

Matches any position that is NOT a word boundary.

*
Zero or more

Matches the preceding element zero or more times (greedy).

+
One or more

Matches the preceding element one or more times (greedy).

?
Zero or one

Matches the preceding element zero or one time (optional).

{n}
Exactly n

Matches the preceding element exactly n times.

{n,}
n or more

Matches the preceding element at least n times (greedy).

{n,m}
Between n and m

Matches the preceding element between n and m times (inclusive, greedy).

*?
Lazy zero or more

Matches zero or more times, but as few as possible (lazy/non-greedy).

+?
Lazy one or more

Matches one or more times, but as few as possible (lazy/non-greedy).

??
Lazy zero or one

Matches zero or one time, preferring zero (lazy/non-greedy).

(abc)
Capturing group

Groups multiple tokens together and captures the matched text for back-referencing.

(?:abc)
Non-capturing group

Groups tokens together without capturing. Useful for applying quantifiers to groups.

(?<name>abc)
Named group

Captures the matched text and assigns it a name for easier reference.

\1
Backreference

Matches the same text as previously captured by the nth capturing group.

(a|b)
Group alternation

Captures one alternative from inside a group. Combines grouping with alternation.

|
Alternation (OR)

Matches the expression before or after the pipe. Acts as a boolean OR.

\\
Escaped backslash

Matches a literal backslash character.

\n
Newline

Matches a line feed character (LF, U+000A).

\t
Tab

Matches a horizontal tab character (U+0009).

\r
Carriage return

Matches a carriage return character (CR, U+000D).

\.
Escaped dot

Matches a literal period/dot character.

\^
Escaped caret

Matches a literal caret character.

\$
Escaped dollar

Matches a literal dollar sign character.

\(
Escaped parenthesis

Matches a literal opening parenthesis.

g
Global

Find all matches rather than stopping after the first match.

i
Case-insensitive

Makes the entire pattern case-insensitive.

m
Multiline

Makes ^ and $ match the start/end of each line rather than the whole string.

s
Dotall (single-line)

Makes the dot (.) match newline characters as well.

u
Unicode

Enables full Unicode matching. Required for proper emoji and surrogate pair handling.

y
Sticky

Matches only at the index indicated by the lastIndex property. Does not search forward.

(?=abc)
Positive lookahead

Asserts that what follows the current position matches the pattern, without consuming characters.

(?!abc)
Negative lookahead

Asserts that what follows the current position does NOT match the pattern.

(?<=abc)
Positive lookbehind

Asserts that what precedes the current position matches the pattern, without consuming characters.

(?<!abc)
Negative lookbehind

Asserts that what precedes the current position does NOT match the pattern.

Live Sandbox

//g
Flags
No matches found

Common Patterns

Was this tool helpful?

使用方法

按照以下步驟使用正規表達式速查表:

  1. 準備輸入:在輸入區域輸入資料,或將檔案拖曳至上傳區域。工具支援多種輸入方式以適應不同使用場景
  2. 設定選項:根據需要調整處理參數和輸出格式。工具提供合理的預設值,適用於大多數常見使用場景
  3. 執行處理:點擊處理按鈕開始操作——處理在瀏覽器中即時完成,結果立即顯示在輸出區域
  4. 檢查結果:確認處理結果符合預期。如需調整,可修改參數後重新執行處理
  5. 匯出結果:複製結果到剪貼簿或下載為檔案。支援多種輸出格式選擇,滿足不同的後續使用需求

正規表達式速查表完全在瀏覽器中運作——您的資料不會上傳至任何伺服器或雲端服務。處理引擎經過效能最佳化,可在桌面電腦、平板電腦和手機等各種裝置上提供流暢的使用體驗。無需安裝軟體、無需註冊帳號,開啟瀏覽器即可立即使用。

關於此工具

正規表達式速查表是 DevToolkit 線上工具集的一部分,專為提供高效、安全、便利的數位處理體驗而設計。工具完全在您的瀏覽器中運作,利用現代 Web 技術(JavaScript、Canvas API、Web Crypto API、WebAssembly)提供接近原生桌面應用程式的處理能力和回應速度。

隱私是我們的核心設計原則。所有資料處理在您的裝置本機完成,不會傳送至任何外部伺服器或雲端服務。沒有使用者追蹤、沒有資料收集、沒有帳號要求。您可以安心處理任何敏感資料,包括商業機密、個人文件和尚未發布的內容。

工具介面採用直覺的設計原則——常用功能一目了然,進階選項按需展開。支援桌面電腦、平板電腦和手機等所有裝置,響應式佈局確保在任何螢幕大小上都有最佳的操作體驗。使用現代瀏覽器(Chrome、Firefox、Safari、Edge)即可開始使用,無需安裝外掛程式。

為什麼使用此工具

選擇正規表達式速查表的理由:

  • 完全免費使用:所有功能永久免費——沒有隱藏費用、沒有使用次數限制、沒有浮水印、不需要註冊帳號
  • 隱私安全保障:所有處理在瀏覽器本機完成——不上傳任何資料至外部伺服器,適合處理敏感和機密內容
  • 即時處理速度:瀏覽器本機處理消除了網路傳輸延遲,輸入資料後立即獲得處理結果,提升工作效率
  • 跨平台使用:在 Windows、macOS、Linux 和行動裝置的現代瀏覽器中都能使用——無需安裝額外軟體或外掛程式
  • 專業級輸出:工具使用經過驗證的演算法和業界標準函式庫,輸出結果準確可靠可直接用於專業工作環境

DevToolkit 的設計理念是讓每個人都能免費使用專業工具。本機處理的架構確保您的資料安全,同時提供接近桌面應用的使用體驗。

常見問題

正規表達式速查表包含哪些類型的技術參考資訊?
正規表達式速查表提供結構化的技術參考資料,涵蓋常用的語法、指令和最佳實務。內容經過專業整理,以清晰的分類和搜尋功能幫助您快速找到所需資訊。資料定期更新以保持內容的時效性。
正規表達式速查表的參考內容是否包含實際使用範例?
是的——每個項目都附有實際的使用範例和詳細的說明文字。正規表達式速查表的範例涵蓋基礎和進階的不同用法。程式碼範例可一鍵複製,直接用於您的專案中。範例持續更新以反映最新的最佳實務。 正規表達式語法按字元類別、量詞、群組等功能分類說明。
如何在正規表達式速查表中快速找到需要的參考內容?
正規表達式速查表提供分類瀏覽、關鍵字搜尋和標籤篩選等多種查找方式。搜尋支援模糊匹配功能,即使記不清確切名稱也能找到。常用項目可加入書籤方便快速存取,顯著提升查閱效率。
正規表達式速查表的內容是否適合初學者閱讀學習?
適合——正規表達式速查表的內容從基礎概念到進階技巧循序漸進。每個項目都有簡明的描述和具體的使用場景。初學者可從基礎分類開始學習。同時也為有經驗的專業人員提供快速查閱參考的便利。
正規表達式速查表的參考資料準確性如何保證更新?
正規表達式速查表的內容基於官方文件和權威技術資源整理而成。定期與最新版本的規範和標準對照更新。社群回饋幫助及時發現和修正錯誤。涵蓋主流版本和相容性資訊,確保參考資料可靠。