.BG
.FN grep
.TL
Search for Pattern in Text
.CS
grep(pattern, text)
.AG pattern
character string giving a regular expression.
Regular expressions are built up as for the `egrep' command.
.Nx egrep
.AG text
character vector.
.RT
numeric vector telling which elements of `text' matched `pattern'.
.EX
state.name[ grep("ia$",state.name) ]
  # find state names that end in "ia"
.KW manip
.WR
