On 04-Mar-09 07:55:11, Bob Roberts wrote: > Hi, > I'm trying to write a regular expression that captures numbers in the > form 9,007,653,372,262.48 but does not capture dates in the form > 09/30/2005 > I have tried numerous expressions, but they all seem to return the > dates as well. Thanks.
Testing the regular expression [0123456789,.][^/]* with grep (on Linux, R is not involved in this test): $ grep '[ ][0123456789,.][^/]*[ ]' << EOT > A line with no numbers > This is 9,007,653,372,262.48 one line > Another no-numbers > This is 09/30/2005 another line > Yet another no-numbers > EOT This is 9,007,653,372,262.48 one line Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <ted.hard...@manchester.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 04-Mar-09 Time: 09:30:17 ------------------------------ XFMail ------------------------------ ______________________________________________ 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.