Your choice. *shrugs* I was asking a general question whose answer I plan on using in a number of other applications. There are many situations where one would want to parse something using a regex as groups of N characters, advancing M characters at a time. It just so happens that this is the first reason I've wanted to.
------ We are the carpenters and bricklayers of the Information Age. Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement. | [reply] [Watch: Dir/Any] |
"Who me?"
Your timing is pretty lame. You should have known you'd be spoiling the golf tournament for some people. And contrary to your assertion, I do not think that capturing groups of characters with a regex while only advancing partially is actually something you'd want to do in general. Using substr would be more efficient, as metadoktor's reply wisely noted. This is primarily useful for shortening your golf, so don't act all innocent.
| [reply] [Watch: Dir/Any] [d/l] |