CreeperJIMM's icon苦力怕怕

RegEx 生成器

正則表達式 (Pattern)

//g

即時測試與匹配沙盒

智慧 POSIX 積木

實戰代碼片段

定義正則
const regex = /[a-zA-Z0-9]+/g;
判斷布林值
const isMatch = regex.test(text);
提取單一匹配
const firstMatch = text.match(regex)?.[0];
提取所有匹配 (陣列)
const allMatches = [...text.matchAll(regex)].map(m => m[0]);

喜歡這個工具嗎?

快分享給好友使用吧!

回饋與支持

若遇到 Bug 歡迎反應,或贊助我一杯咖啡!