[R] pattern matching
ruipbarradas at sapo.pt
Wed Oct 10 14:31:09 CEST 2012
Try the following.
pattern <- "between [[:digit:]]+ to [[:digit:]]+"
re <- regexpr(pattern, string)
Hope this helps,
Em 10-10-2012 12:45, arunkumar1111 escreveu:
> My string contain
> string = "The sales is good when my num1 between 1 to 5 . else the sales is
> i want to find the patten between 1 to 5 . between and to will be constant
> but the numbers would be changing. How to search for that pattern.
> Please help
> Thanks in Advance
> View this message in context: http://r.789695.n4.nabble.com/pattern-matching-tp4645688.html
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help