filterKeysByRegExp() public method

Returns all the elements which key matches the regexp
public filterKeysByRegExp ( string $regexp ) : MetadataBag
$regexp string
return MetadataBag
 /**
  * @covers PHPExiftool\Driver\Metadata\MetadataBag::filterKeysByRegExp
  */
 public function testFilterKeysByRegExp()
 {
     $this->object->set('oneKey', 'oneValue');
     $this->object->set('oneSecondKey', 'anotherValue');
     $this->object->set('thirdKey', 'thirdValue');
     $this->assertEquals(2, count($this->object->filterKeysByRegExp('/one.*/')));
 }