The regex ^a$ only matches "a", but it doesn't match itself.
I can still see the neat aspect of the post. But that is not a match.
The string "aaaa" is a Regular Expression that describes a language with exactly one string: "aaaa".
Some regular expression libraries have two operations: They can tell you if a string contains a match somewhere within it, or is exactly a match. Some other libraries only do the first operation, and you need to explicitly ask for "^aaaa$" to get an exact match.
This is one of the things on the differences between the formal definition of a Regular Expression, and a regex library.
Your regex is actually /a/ which does not match the string "/a/".
Edit: looks like slashes weren't even used in the example.
Deutsch&Lampson's original paper on qed showing s/// used for string substitution prior to it gaining regexps is here: http://research.microsoft.com/en-us/um/people/blampson/04-On...
Incidentally the name 'grep' originated here, 'G/RE/P' was a qed command to do a Global Regular Expression match and Print the matches.
> […] for the sake of the challenge, let the expression be delimited (starting symbol, expression, ending symbol ex: /fancypantpattern/ or @[^2048]@), if you want to argue quotes as your delimiter, so be it. I think given the apparent difficulty of this problem it won't make much of a difference.