Displaying 1 result from an estimated 1 matches for "exdpressions".
Did you mean:
dexpressions
2010 Jun 12
2
Logic with regexps
...hes 'rex1'
AND X does not match 'rex2'?
The desired end result can be achieved by logically combining
the results of a grep using 'rex1' with the results of a grep
on 'rex2', illustrated by the following example:
## Given character vector X (below), and two regular exdpressions
## rex1="abc", rex2="ijk", to return the elements of X which match
## rex1 AND do not match rex1:
X <- c(
"abcdefg", # Yes
"abchijk", # No
"mnopqrs", # No
"ijkpqrs", # No
"abcpqrs" ) # Y...