Erlang/OTP Forums

Author Message

<  Erlang patches mailing list  ~  regexp: how to match a null string?

cpressey at catseye.mb.ca
Posted: Fri Mar 28, 2003 6:16 am Reply with quote
Guest
On Thu, 27 Mar 2003 18:54:53 -0600
Chris Pressey <cpressey_at_catseye.mb.ca> wrote:

> In my mind, "^(.*)$" should match a null string.
> It doesn't match any characters, but it's still a valid match.
> But because regexp deals only in terms of characters matched -
> there's no way to tell!

In lieu of a better solution... attached is a patch to regexp.erl which
adds the function

is_match(String, RegExp) -> true | false | {error, Reason}

-Chris



Post generated using Mail2Forum (http://m2f.sourceforge.net)

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum