![]() |
|
No such thing as a small change | |
PerlMonks |
comment on |
( #3333=superdoc: 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 reply to Re^7: Faster regex to split a string into runs of similar characters?
by Eily
|
|