From: Todd Benson Date: 2007-07-28T23:23:44+09:00 Subject: Re: Finding un-escaped characters in scan() On 7/28/07, Fred Phillips wrote: > Hmm, it appears I made a typo in my actual code. But this still isn't the > result I want. > > For instance "test,,test" only returns one comma. And the results you have > shown above, are returning the wrong number as well. > Fred: Ah, I see what you are saying in your original post. "test,,test".scan(/.,/) => ["t,"] It should find ",," too, right? Interesting behavior and has nothing to do with backslashes, just the fact that scan won't find it if the character is adjacent to itself. Like you said, where it starts the next scan, maybe. I'm not sure how to get around it without playing around a bit. Todd