Skip to content

gregexpr (PR#9965)

1 message · Greg Snow

#
If you want all the matches (including overlaps) then you could try one
of these:
[[1]]
[1] 1 3
attr(,"match.length")
[1] 0 0
[[1]]
[1] 1 3
attr(,"match.length")
[1] 2 2

The book "Mastering Regular Expressions" by Jeffrey Friedl has a lot of
detail on the hows and whys of regular expression matching.

--=20
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at intermountainmail.org
(801) 408-8111
=20
=20