A regular expression that will never match

Posted . Visible to the public.

So you have a method returning a regular expression but one case that should not yield a matching Regexp object but still keep the API stable? Just return one that never matches:

/(?!)/
Profile picture of Arne Hartherz
Arne Hartherz
Last edit
Keywords
ruby, perl
License
Source code in this card is licensed under the MIT License.
Posted by Arne Hartherz to makandra dev (2013-02-20 18:15)