app/Module/BatchUpdate/BatchUpdateMarriedNamesPlugin.php
private function surnames(GedcomRecord $record): array
    {
        $gedcom = $record->gedcom();

        if (preg_match_all('/^(?:1 NAME|2 _MARNM) .*\/(.+)\//m', $gedcom, $match)) {
            return $match[1];
        }

        return [];
    }
private function surnames(GedcomRecord $record): array
    {
        $gedcom = $record->gedcom();

        if (preg_match_all('/^(?:1 NAME|2 _MARNM) .*\/(.+)\//m', $gedcom, $match)) {
            return $match[1];
        }

        return [];
    }
private function surnames ( GedcomRecord $ record ) : array { $ gedcom = $ record -> gedcom ( ) ; if ( preg_match_all ( '/^(?:1 NAME|2 _MARNM) .*\/(.+)\//m' , $ gedcom , $ match ) ) { return $ match [ 1 ] ; } return [ ] ; }
Extract a list of surnames from a GEDCOM record.

@param GedcomRecord $record

@return string[]
Extract a list of surnames from a GEDCOM record .