Skip to content
Prev 164708 / 398506 Next

gregexpr - match overlap mishandled (PR#13391)

Controlling the pointer is going to be very different from perl since the R functions are vectorized rather than focusing on a single string.

Here is one approach that will give all the matches and lengths (for the original problem at least):
[1]  1  5  9 13 17 21 25 29 33
[1] 8 8 8 8 8 8 8 8 8


--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111