The R Project SVN R

Rev

Rev 59719 | Rev 84750 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 59719 Rev 61160
Line 44... Line 44...
44
  \code{\link{sub}}, etc about substitutions using regexps.
44
  \code{\link{sub}}, etc about substitutions using regexps.
45
}
45
}
46
\examples{
46
\examples{
47
stopifnot(glob2rx("abc.*") == "^abc\\\\.",% '\\' doubled in Rd file!
47
stopifnot(glob2rx("abc.*") == "^abc\\\\.",% '\\' doubled in Rd file!
48
          glob2rx("a?b.*") == "^a.b\\\\.",
48
          glob2rx("a?b.*") == "^a.b\\\\.",
49
          glob2rx("a?b.*", trim.tail=FALSE) == "^a.b\\\\..*$",
49
          glob2rx("a?b.*", trim.tail = FALSE) == "^a.b\\\\..*$",
50
          glob2rx("*.doc") == "^.*\\\\.doc$",
50
          glob2rx("*.doc") == "^.*\\\\.doc$",
51
          glob2rx("*.doc", trim.head=TRUE) == "\\\\.doc$",
51
          glob2rx("*.doc", trim.head = TRUE) == "\\\\.doc$",
52
          glob2rx("*.t*")  == "^.*\\\\.t",
52
          glob2rx("*.t*")  == "^.*\\\\.t",
53
          glob2rx("*.t??") == "^.*\\\\.t..$",
53
          glob2rx("*.t??") == "^.*\\\\.t..$",
54
          glob2rx("*[*")  == "^.*\\\\["
54
          glob2rx("*[*")  == "^.*\\\\["
55
)
55
)
56
}
56
}