[erlang-questions] Regex to match an empty string
Tue Feb 24 03:12:51 CET 2009
On 24/02/09 Robert Virding wrote:
> Can't you instead just pattern match the string against "" or 
> (they are equal)? Using regular expressions for so simple patterns is
> really overkill.
No, as the code is already in production and will need re-testing if I
change it - a tedious process. Plan B is to write a wrapper for regex
that knows how to handle $^ and empty strings.
The program's magic is all done by config file changes, and a regex is
used to match that particular field. Regexes elsewhere can match an
empty string. Can Erlang? If the answer is "no, it's broken" I need to
know so I can schedule a software update etc.
More information about the erlang-questions