Try this: x <- "This happened in the 21. century." gregexpr("[[:digit:]]\\.", x)
This returns the position of the digit-dot in the string. On Mon, Jun 8, 2009 at 11:15 AM, Mark Heckmann <mark.heckm...@gmx.de> wrote: > Hi, > > > > i need to recognize itemization structures in strings which follow the > format: "digit-digit-dot" like e.g. > > > > 1. > > 2. > > 19. > > 211. > > > > Given the string " This happened in the 21. century." (the dot behind 21 is > used in German instead of 21st) I want know where the dots are but I do not > want the 21.-dot to be returned as well. > > > > I am not good at regular expressions. How can I retrieve or recognize dots > excluding the digit-digit-dot structure? > > > > TIA, Mark > > > > ------------------------------- > > Mark Heckmann > > + 49 (0) 421 - 1614618 > > www.markheckmann.de > > R-Blog: <http://ryouready.wordpress.com> http://ryouready.wordpress.com > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.