in reply to Re: Smart Substrings
in thread Smart Substrings

I knew this would be coming...

Yes, I did resort to a regex, but only because of two exceptional cases (extra spaces and tabs). Not knowing the poster's requirements in this regard, I wrote something that would handle these cases. The non-regex solution is still a much better fit to this problem, and the regex that I did use was kept fairly simple. It would even have been /\w\s\/, but I chose to simplify the indexing arithmetic instead.

Hmm... all this backtracking, I'm beginning to sound like a regex myself :)

   MeowChow                                   
               s aamecha.s a..a\u$&owag.print