in reply to Re^6: Faster regex to split a string into runs of similar characters?
in thread Faster regex to split a string into runs of similar characters?
For your data, using a null byte instead of a space would be importeant.
Actually that's why I chose /.\0*/gs instead of /[^\0]\0*/s. This means that the first character can be a 0, and every iteration after that it will never start with null because of the way regex work. Or technically, the idea crossed my mind, I realized it would still work by chance, and then forgot to mention it :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Faster regex to split a string into runs of similar characters?
by BrowserUk (Patriarch) on Nov 22, 2016 at 16:34 UTC |