CrawlableDatasetFilter filter = null;
if ( filterPattern != null )
{
// Include atomic datasets that match the given filter string.
MultiSelectorFilter.Selector selector = new MultiSelectorFilter.Selector( new RegExpMatchOnNameFilter( filterPattern), true, true, false );
filter = new MultiSelectorFilter( selector );
}
else
{
filter = new RegExpMatchOnNameFilter( ".*" );
}