This challenge is pretty simple. As input, you take in a regular expression.
Then, you output a truthy/falsey of whether or not your source code matches the regular expression. It's that simple! Just two more things:
- No quine builtins; you may, however, access the code's source code by file IO, etc.
- This is code-golf, so shortest code in bytes wins!
Example
If your source code was say, abc, an input of a\wc would return true and an input of a\dc would return false.
\dis not special in BRE; it matches the characterd. 3. Choosing a specific regex flavor restricts your challenge to languages that support it, and few languages support BRE. Is that intentional? \$\endgroup\$