import re


def not_both_titles(names_string):
    """Returns a list of names not preceded by [Pp]rof./[Dd]oc. and 
       followed by ', Ph.D.'

    >>> not_both_titles('doc. Josef Tyl, Rudolf Srp, Ph.D., Pavel Vlk, doc. RNDr. Petr Berka, Ph.D., Jan Hora')
    ['doc. Josef Tyl', 'Rudolf Srp, Ph.D.', 'Pavel Vlk', 'Jan Hora']
    """

    # a name that is either preceded by [Pp]rof./[Dd]oc. and followed by Ph.D.
    # or other name with potential titles
    pat = re.compile(r'''
                      (?:(?:(?:[Dd]oc\.)|(?:[Pp]rof\.))\s[^,]+,\sPh\.D\.)              # it is either
                      |                                                              # or
                      ((?:[A-Za-z]+\.\s)*[A-Z][a-z]+\s[A-Z][a-z]+(?:,\sPh\.D\.)?)    # it is
                      ''', re.X)
    return [g1 for g1 in pat.findall(names_string) if g1]