Monu Tools

בודק ביטויים רגולריים (RegEx)

בדיקת ביטוי רגולרי מול הטקסט שלכם בזמן אמת. ראו כל התאמה מודגשת, עם קבוצות לכידה ודגלים. רץ כולו בדפדפן שלכם.

כיצד להשתמש בבודק RegEx

  1. 01

    הקלידו את הביטוי הרגולרי שלכם בשדה התבנית.

  2. 02

    הפעילו את הדגלים (g, i, m, s, u) שאתם צריכים.

  3. 03

    הזינו את מחרוזת הבדיקה וראו התאמות מודגשות עם הקבוצות שלהן.

What the regex tester does

The regex tester lets you build and debug regular expressions against your own sample text, with matches highlighted live as you type. It is useful for validating input formats, extracting fields from logs, or testing a pattern before pasting it into code.

Everything runs in your browser, so your patterns and test text are never uploaded.

Which engine it uses

It uses the JavaScript regular-expression engine, the same one in every browser and in Node.js, so a pattern that works here works in your JavaScript and TypeScript code.

Flags and capture groups

Toggle the global, case-insensitive, multiline and other flags to change how a pattern matches. You see every match along with its capture groups, so you can confirm exactly what each part of the pattern is pulling out.

Differences across regex flavors

Other languages such as PCRE, Python and Go share most syntax but differ in some features, so a few advanced constructs may behave differently outside JavaScript. If a pattern works here but not in another language, an engine-specific construct is usually the reason.

שאלות נפוצות

באיזה גרסת regex נעשה שימוש?

מנוע JavaScript (ECMAScript) המובנה בדפדפן שלכם, כך שהתוצאות תואמות את מה שקוד ה-JavaScript וה-TypeScript שלכם יעשה.

מה המשמעות של הדגלים?

g מתאים לכל המופעים, i מתעלם מאותיות גדולות/קטנות, m גורם ל-^ ול-$ להתאים בשבירות שורה, s מאפשר לנקודה להתאים לתווי שורה חדשה, ו-u מפעיל טיפול מלא ב-Unicode.

כיצד אני מתאים על פני מספר שורות?

הפעילו את דגל ה-multiline‏ (m) כך ש-^ ו-$ יתאימו בכל שבירת שורה, והוסיפו את דגל ה-dotAll‏ (s) אם אתם צריכים גם שהנקודה תתאים לתווי שורה חדשה.

האם קבוצות לכידה מוצגות?

כן. כל התאמה מפרטת את קבוצות הלכידה הממוספרות שלה, וקבוצות בעלות שם מופיעות לפי שמן, כך שתוכלו לראות בדיוק מה לכד כל חלק בתבנית.

מדוע התבנית שלי עובדת כאן אך לא בשפה אחרת?

הכלי משתמש במנוע JavaScript. PCRE, Python ואחרות חולקות את רוב התחביר אך נבדלות ב-lookbehind, בקבוצות בעלות שם ובחלק מתווי ההיברחה, לכן העבירו תבניות מתקדמות בזהירות.

האם הטקסט שלי מועלה?

לא. התבנית וטקסט הבדיקה שלכם מוערכים כולם בדפדפן שלכם ולעולם אינם עוזבים את המכשיר שלכם.

מקורות

הטמע את הכלי הזה

הוסף את הכלי הזה לאתר שלך. העתק את קטע הקוד שלהלן; הוא מתעדכן אוטומטית.

<iframe src="https://monu.tools/embed/he/regex-tester" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

כלים קשורים