Regex that only matches itself
codegolf.stackexchange.com
Regex that only matches itself
1–10 of 66 posts
Re: Regex that only matches itself
#2This is ridiculous. How does one go about deriving something like this? Really impressive.
Re: Regex that only matches itself
#3I wish I was as smart as these people.
Re: Regex that only matches itself
#4This is probably a stupid question but what is the minimal formal language that has an accepting path as a statement in the language?
Re: Regex that only matches itself
#5[deleted]
Re: Regex that only matches itself
#6This is probably a stupid question but what is the minimal formal language that has an accepting path as a statement in the language?
[deleted]
Re: Regex that only matches itself
#7Reminds me of a quine - a non-empty computer program which takes no input and produces a copy of its own source code as its only output
Re: Regex that only matches itself
#8Reminds me of a quine - a non-empty computer program which takes no input and produces a copy of its own source code as its only output https://en.m.wikipedia.org/wiki/Quine_(computing)
It is literally a quine, viewed as a program in a language where (for example) the code consists of a regular expression and the output is the sequence of all strings matching that regular expression.
Re: Regex that only matches itself
#9Reminds me of a quine - a non-empty computer program which takes no input and produces a copy of its own source code as its only output https://en.m.wikipedia.org/wiki/Quine_(computing)
[deleted]
Re: Regex that only matches itself
#10I think I might be missing something. Wouldn't something like "a" be a valid 1-byte regular expression that only matches instances of "a"?