original_string: protected function findDefaultDatabase(string $connectionString)
      {
          preg_match('/\S+\/(\w*)/', $connectionString, $matches);
  
          if ($matches[1] ?? null) {
              $this->defaultDatabase = $matches[1];
          }
      }
code: protected function findDefaultDatabase(string $connectionString)
      {
          preg_match('/\S+\/(\w*)/', $connectionString, $matches);
  
          if ($matches[1] ?? null) {
              $this->defaultDatabase = $matches[1];
          }
      }
code_tokens: protected function findDefaultDatabase ( string $ connectionString ) { preg_match ( '/\S+\/(\w*)/' , $ connectionString , $ matches ) ; if ( $ matches [ 1 ] ?? null ) { $ this -> defaultDatabase = $ matches [ 1 ] ; } }
docstring: Find and stores the default database in the connection string.
  
  @param string $connectionString mongoDB connection string
docstring_tokens: Find and stores the default database in the connection string .