Random thought
November 11, 2008
What is the shortest regular expression that matches only itself, including the / delimiters?
Filed under: Programming | Comments (1)
November 11, 2008
What is the shortest regular expression that matches only itself, including the / delimiters?
Filed under: Programming | Comments (1)
I think there isn’t one that matches *only* itself, because the only way a regex can match a string that is longer than itself is using a repeat operator, which implies the regex will match more than just itself.