1

Closed

Should we allow empty regex matching?

description

If you leave the Reg Ex field empty and type anything in the Text to Query field, it still finds a match. Do you think this behaviour should be changed? Like claim it didn't find a match whenever the regex you typed is empty? ("")
Closed May 13, 2013 at 12:10 PM by mgbrown

comments

mgbrown wrote May 13, 2013 at 12:09 PM

To me the main aim of this tool is to test what the .Net framework would do. Given that the following code prints True, I think this should be left how it is.
         Regex regex = new Regex("");
         Console.WriteLine(regex.IsMatch("Some random text"));
         Console.ReadKey(true);

wrote May 13, 2013 at 12:10 PM

wrote May 16, 2013 at 3:04 AM