Learn R Programming

Kmisc (version 0.2.0)

re.exists: Check whether Regular Expression was Found

Description

Checks whether a match was found for a given regular expression in a vector. See examples for usage.

Usage

re.exists(...)

Arguments

...
passed to grep.

See Also

lg

Examples

Run this code
if( re.exists("^ap", c("apple", "banana") ) ) print("yay!")

Run the code above in your browser using DataLab