Re: match()
- Posted by irvm at ellijay.com May 26, 2003
- 430 views
On Monday 26 May 2003 03:07 am, you wrote: > > On Mon, 26 May 2003 13:30:41 +0700, aku saya <akusaya at gmx.net> wrote: > > match("", "something") shows an error > > first argument of match() must be a non-empty sequence > > > > I think it should return 1, because "" is a substring of "something", > > and is located in any position. No. If it is a valid string, *something*, i.e., an ascii character, appears in every single position of that string. "Nothing" does not, and can never, appear in any string. In the string "ABC", if match("",string) were to return 1, then it's wrong, isn't it? Because anyone can clearly see that 'A' is the first character. And 'A' is not nothing. Irv