Skip to main content
SiteIndex
للمطورينجاهزة للاستخدام

اختبر أنماط regex باستخدام النص

اختبر أنماط regex على نص نموذجي، وراجع التطابقات ومواضعها ومجموعات الالتقاط المسماة.

مساحة عمل تفاعلية

لا حاجة إلى حساب
مختبر التعبيرات النمطية

JavaScript expressions run in a separate worker with a 1-second execution limit. Maximum 2,000 pattern characters, 500,000 text characters, and 1,000 displayed matches. Indices are UTF-16 offsets. An empty pattern matches zero-width positions.

Flags
d indices · g global · i ignore case · m multiline · s dotAll · u unicode · v unicode sets · y sticky (u and v are mutually exclusive)
Pattern library — click to load
Live preview1 match
SiteIndex

Yellow = whole match; blue and green alternate per capture group. Highlighting updates as you type; the buttons run the same check in the worker with the full limits.

Replace (substitution)

<SiteI>ndex

Without the g flag only the first match is replaced, exactly like String.replace in JavaScript.

التطابقات والمجموعات المسماة

اعرض كل تطابق وموضعه، بالإضافة إلى مجموعات الالتقاط المسماة في النمط.

Both actions use the same flags. Find all matches adds g for enumeration; y keeps sticky behavior. Unmatched captures are null in copied JSON.

Pattern explained & cheat sheet

A plain-English breakdown of the current pattern, plus a quick syntax reference.

TokenMeaning
sitethe literal text "site"
[A-Z]one character in this set (ranges like a-z allowed)
+?one or more of the previous item, matching as few as possible (lazy)

Cheat sheet

Character classes\d digit · \w word character · \s whitespace · . any character · [a-z] set or range · [^a-z] negated set
Quantifiers* zero or more · + one or more · ? optional · {n} exactly n · {n,} at least n · {n,m} between n and m · add ? for lazy (shortest) matching
Anchors^ start of text/line · $ end of text/line · \b word boundary · \B non-boundary
Groups(…) capture · (?:…) non-capturing · (?<name>…) named capture · (?=…) lookahead · (?!) negative lookahead · | alternation (or)
ما هي مختبر التعبيرات النمطية؟

اختبر أنماط regex على نص نموذجي، وراجع التطابقات ومواضعها ومجموعات الالتقاط المسماة.

طريقة العمل

اختبر أنماط regex على نص نموذجي، وراجع التطابقات ومواضعها ومجموعات الالتقاط المسماة.

استخدامات شائعة

اختبر أنماط regex على نص نموذجي، وراجع التطابقات ومواضعها ومجموعات الالتقاط المسماة.

القيود

قد تعتمد النتائج على المتصفح والشبكة والمدخلات والخدمات الخارجية. هذه الأداة للمعلومات ولا تغني عن التشخيص المتخصص أو المشورة المهنية.

الأسئلة الشائعة
ما هي مختبر التعبيرات النمطية؟
اختبر أنماط regex على نص نموذجي، وراجع التطابقات ومواضعها ومجموعات الالتقاط المسماة.

أدوات ذات صلة