Regex Tester (Matches, Groups, Replacement Preview)

regex test വേഗത്തിൽ നടത്തണോ? ഈ regex tester-ൽ paste ചെയ്ത് ഉടൻ verify ചെയ്യുക.

highlight ചെയ്ത matches, capture groups, replacement output എന്നിവ ഒരേ screen-ൽ കാണുക.

നിങ്ങളുടെ input browser-ൽ ലോകൽ ആയി process ചെയ്യപ്പെടുന്നു; server-ലേക്ക് അയക്കുന്നില്ല.

എങ്ങനെ ഉപയോഗിക്കാം

  1. pattern നൽകുകയും ആവശ്യമായ flags (g/i/m) തിരഞ്ഞെടുക്കുകയും ചെയ്യുക.
  2. source text paste ചെയ്യുക. auto-run ON ആണെങ്കിൽ result ഉടൻ update ചെയ്യും.
  3. match list ഉപയോഗിച്ച് locations പരിശോധിച്ച് ഓരോ match-ലേക്കും jump ചെയ്യുക.
  4. captures, replacement output പരിശോധിക്കാൻ Groups, Replacement tabs ഉപയോഗിക്കുക.

ഉദാഹരണങ്ങൾ

Email extraction

Input: email addresses ഉള്ള text

Output: highlight ചെയ്ത matches, start/end positions

key=value replacement

Input: multi-line key=value text

Output: $1, $2 ഉപയോഗിച്ച replacement output

Log line filter

Input: INFO / WARN / ERROR ഉള്ള log text

Output: m flag ഉപയോഗിച്ച line-based matching

Replacement Cheat Sheet

  • $1, $2 ... : capture group references
  • $& : whole match
  • $` : before match / $' : after match

കുറിപ്പ്

  • ഈ tool patterns JavaScript (ECMAScript) regular expressions ഉപയോഗിച്ച് evaluate ചെയ്യുന്നു.
  • ചില PCRE features (ഉദാ. atomic groups) ലഭ്യമല്ല.
  • JavaScript features പോലും runtime environment അനുസരിച്ച് മാറാം.
  • results PCRE-യോട് കൃത്യമായി ഒത്തിരിക്കുമെന്ന് ഉറപ്പില്ല.

FAQ

g/i/m flags എന്താണ്?

checkboxes ഉപയോഗിച്ച് ഇവ toggle ചെയ്യാം. (g=global, i=ignore case, m=multiline)

replacement-ും പരീക്ഷിക്കാനാകുമോ?

അതെ. replacement string നൽകി Replacement tab പരിശോധിക്കുക. $1 പോലുള്ള group references പിന്തുണയ്ക്കുന്നു.

ഇത് PCRE-യിൽ നിന്ന് എങ്ങനെ വ്യത്യസ്തമാണ്?

ഈ tool JavaScript regular expressions ഉപയോഗിക്കുന്നു. spec വ്യത്യാസങ്ങൾ കാരണം അതേ pattern PCRE-യോട് വ്യത്യസ്തമായ result നൽകാം.

ബന്ധപ്പെട്ട ഉപകരണങ്ങൾ