Why does "*" cause my tiny regextester program to crash?

Jesse Phillips jessekphillips+D at gmail.com
Sun Jan 30 18:29:16 PST 2011

Alex Folland Wrote:

> I wrote this little program to test for regular expression matches.  I 
> compiled it with in Windows with DMD 2.051 through Visual Studio 2010 
> with Visual D.  It crashes if regexbuf is just the single character, 
> "*".  Why?  Shouldn't it match the entire string?

While it would be best to give your example data. The regular expression for matching all data is ".*"

* represents a repeating something of zero or more.
. represents anything

So "*" just makes no sense.

More information about the Digitalmars-d-learn mailing list