If you want to match all 256 byte values, you'll need the /s modifier.
Yes. /s not /m; I always mix those two up.
why are you using look-ahead assertions? Isn't /((.)\2+)/g stricly identical to your regex?
No. That won't match a single character 'run'.
In reply to Re^2: Faster regex to split a string into runs of similar characters?
by BrowserUk
in thread Faster regex to split a string into runs of similar characters?
by BrowserUk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |