Regex Tester
ត្រូវការសាក regex យ៉ាងលឿនមែនទេ? Paste ហើយផ្ទៀងផ្ទាត់ភ្លាមៗ។
មើល highlighted matches, capture groups និង replacement output នៅលើអេក្រង់តែមួយ។
របៀបប្រើ
- បញ្ចូល pattern ហើយជ្រើស flags ដែលត្រូវការ (g/i/m)។
- Paste source text។ បើ auto-run បើក លទ្ធផលនឹង update ភ្លាមៗ។
- ប្រើ match list ដើម្បីពិនិត្យទីតាំង និងលោតទៅកាន់ match នីមួយៗ។
- ប្រើ Groups និង Replacement tabs ដើម្បីផ្ទៀងផ្ទាត់ captures និង replacement output។
Examples
Email extraction
Input: Text containing email addresses
Output: Highlighted matches and start/end positions
key=value replacement
Input: Multi-line key=value text
Output: Replacement output using $1 and $2
Log line filter
Input: Log text with INFO / WARN / ERROR
Output: Line-based matching with m flag
Replacement Cheat Sheet
- $1, $2 ... : capture group references
- $& : whole match
- $` : before match / $' : after match
Note
- This tool evaluates patterns using JavaScript (ECMAScript) regular expressions.
- Some PCRE features (such as atomic groups) are not available.
- Even JavaScript features can vary by runtime environment.
- Results are not guaranteed to be identical to PCRE.
សំណួរញឹកញាប់
តើ g/i/m flags ជាអ្វី?
ប្រើ checkboxes ដើម្បីបើក/បិទវា។ (g=global, i=ignore case, m=multiline)
តើអាចសាក replacement បានទេ?
បាន។ បញ្ចូល replacement string ហើយពិនិត្យ Replacement tab។ Group references ដូចជា $1 ក៏គាំទ្រផងដែរ។
វាខុសពី PCRE ដូចម្តេច?
ឧបករណ៍នេះប្រើ JavaScript regular expressions ដូច្នេះ pattern ដូចគ្នាអាចឱ្យលទ្ធផលខុសពី PCRE។