@instances = $session->findInstances( $c_patn, $i_patn [, $flags] )
or
@instances = $session->findInstances( "${c_patn}::${i_patn}" [, $flags] )
Finds instances that match the class and instance patterns, according to rules specified in the flags.
The $flags is a set of characters that modifies the way the call works.
A flag of “n” means that subclasses are not recursed into. Therefore, instances in matching classes only are returned. Without “n”, instances of matching classes and their subclasses are returned.
A flag of “r” means that UNIX-like RegEx matching is used during the search. If the “r” flag is not specified, the search uses glob pattern matching.
The RegEx version that is supported is the UTF-8 and Unicode regexp compliant engine (coming from ICU).
The default is no flags, therefore, the search uses glob pattern matching and recursion.
Results are returned as a list of strings, each of which contains a class and instance name delimited with double-colon (::).
The search strings are anchored as if the “^” and “$” had been used in the UNIX-style pattern. Therefore, “rr*” matches “rred” but not “herring”, whereas “`*rr*” matches both of them.
Example:
@found = $session->findInstances( "Router::gw*", "n" );