like
Syntax
like(X, pattern)
Arguments
X is a scalar/vector/matrix.
pattern is a string and is usually used with wildcard character %.
Details
Return a Boolean value scalar or vector indicating whether each element in X fits a specific pattern. The comparison is case sensitive.
Examples
$ like(`ABCDEFG, `DE);
0
$ like(`ABCDEFG, "%DE%");
1
$ a=`IBM`ibm`MSFT`Goog`YHOO`ORCL;
$ like(a, "%OO%");
[0,0,0,0,1,0]
$ a[like(a, "%OO%")];
["YHOO"]
Related function: ilike.