[erlang-questions] Regex to match an empty string
Tue Feb 24 01:18:11 CET 2009
Can't you instead just pattern match the string against "" or  (they are
equal)? Using regular expressions for so simple patterns is really overkill.
P.S. Yes that is probably a bug.
2009/2/24 Vik Olliver <>
> I'm trying to spot a parameter that is an empty string. The weapon of
> choice is regexp:first_match/2 which is used in the code that parses the
> config file.
> In other worlds, "^$" matches an empty string. In Erlang, not so:
> 5> regexp:first_match("","^$").
> What do I use instead?
> Vik :v)
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions