Is there a regular expression that matches valid regular expressions?
By definion, it’s quite simple: No.
The language of all regexes is no regular language (just look at nested parentheses) and therefore there can’t be a regular expression to parse it.
More Related Contents:
- string pattern matching using perl regex [closed]
- Why is this regex allowing a caret?
- Regex to validate date formats dd/mm/YYYY, dd-mm-YYYY, dd.mm.YYYY, dd mmm YYYY, dd-mmm-YYYY, dd/mmm/YYYY, dd.mmm.YYYY with Leap Year Support
- Regex: ignore case sensitivity
- How can we match a^n b^n?
- Decimal or numeric values in regular expression validation
- Carets in Regular Expressions
- What is the ultimate postal code and zip regex?
- How do you debug a regex? [closed]
- Negating a backreference in Regular Expressions
- regex to match a word with unique (non-repeating) characters
- Regex to split HTML tags
- Is it possible to define a pattern and reuse it to capture multiple groups?
- What’s the technical reason for “lookbehind assertion MUST be fixed length” in regex?
- Regular expression to match last number in a string
- R/regex with stringi/ICU: why is a ‘+’ considered a non-[:punct:] character?
- Matching math expression with regular expression?
- How do I use a regex in a shell script?
- How can I exclude some characters from a class?
- Can someone explain Possessive Quantifiers to me? (Regular Expressions)
- Regular expression help – comma delimited string
- Convert to lowercase in a mod_rewrite rule
- How can I use a variable for a regex pattern without interpreting meta characters?
- Insert a newline character every 64 characters using Python
- Regex for Mobile Number Validation
- What kind of formal languages can modern regex engines parse?
- Regular expressions Equivalence
- Remove all characters before a period in a string
- powershell extract text between two strings
- Get Twitter @Username with Regex in R