![]() |
|
Keep It Simple, Stupid | |
PerlMonks |
Re^7: Faster regex to split a string into runs of similar characters?by Eily (Monsignor) |
on Nov 22, 2016 at 16:15 UTC ( #1176348=note: print w/replies, xml ) | Need Help?? |
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 :)
In Section
Seekers of Perl Wisdom
|
|