- यह लेख दो regular expressions (regexes) के अंतर और इंटरसेक्शन की गणना करने के तरीकों पर चर्चा करता है।
- लेखक α < β = false, α = β = true, α > β = false, α & β = α ^ β = ∅, α - β = ∅ जैसी समीकरणों और परिणामों के माध्यम से प्रक्रिया दिखाते हैं।
- साथ ही, इस लेख में निम्न regex grammar का एक संक्षिप्त परिचय भी शामिल है:
- '.' किसी भी एकल character से match करता है
- 'xy' concatenation है: x और उसके बाद y से match करता है
- 'x|y' alternation है: x या y से match करता है
- 'x*' Kleene star है: x को 0 या उससे अधिक बार match करता है
- '(xyz)' grouping है: xyz को एक single item के रूप में मानता है
- '()' empty regular expression है, जो empty string से match करता है
- 'x+' Kleene plus है: x को 1 या उससे अधिक बार match करता है
- 'x?' optional है: वैकल्पिक रूप से x से match करता है
- 'x{n}' exponentiation है: x को n बार स्वयं से concatenate करता है
- 'x{m,n}' repetition है: x को m से n बार तक स्वयं से concatenate करता है
- '[a-z0-9]' grouping है: group के भीतर किसी भी एकल character से match करता है
- '[^a-z0-9]' negated grouping है: group के भीतर न आने वाले किसी भी एकल character से match करता है
- '\c' escape है: विशेष character c से match करता है
- '\u001a' Unicode escape है: संबंधित UTF-16 character से match करता है
- 'a, b, c' सहित बाकी सभी characters स्वयं से match करते हैं।
- लेख में anchor, zero-width assertions, backreference, subgroup extraction, search या partial match, और behavior बदलने वाले अन्य flags जैसी unsupported features का भी उल्लेख है।
- अधिक जानकारी के लिए लेखक 'antimirov' के GitHub page को देखने की सलाह देते हैं।
- इस लेख के लेखक Eiríkr Åsheim हैं, जिन्हें Twitter और Mastodon पर @d6 के नाम से जाना जाता है।
1 टिप्पणियां
Hacker News राय