pike.ida.liu.se
Search for
Home > Docs > Pike reference

[Top]

glob()


Method glob

int(0..1) glob(string glob, string str)
array(string) glob(string glob, array(string) str)

Description

Match strings against a glob pattern.

Parameter glob

The glob pattern. A question sign ('?') matches any character and an asterisk ('*') matches a string of arbitrary length. All other characters only match themselves.

Parameter str
string

1 is returned if the string str matches glob , 0 (zero) otherwise.

array(string)

All strings in the array str are matched against glob , and those that match are returned in an array (in the same order).


See also

sscanf() , Regexp

Module reference for Pike v7.8 release 116, 2008-12-31