The regulation can be found here:
http://eur-lex.europa.eu/LexUriServ/Lex ... 032:EN:PDF
The relevant parts are:
15. ‘residence permit’ means:
(a) all residence permits issued by the Member States
according to the uniform format laid down by Council
Regulation (EC) No 1030/2002 of 13 June 2002 laying
down a uniform format for residence permits for thirdcountry
nationals (2);
(b) all other documents issued by a Member State to thirdcountry
nationals authorising a stay in, or re-entry into,
its territory, with the exception of temporary permits
issued pending examination of a first application for a
residence permit as referred to in point (a) or an application
for asylum;
...
Article 5
Entry conditions for third-country nationals
1. For stays not exceeding three months per six-month period,
the entry conditions for third-country nationals shall be the
following:
(a) they are in possession of a valid travel document or documents
authorising them to cross the border;
(b) they are in possession of a valid visa, if required pursuant
to Council Regulation (EC) No 539/2001 of 15 March 2001
listing the third countries whose nationals must be in possession
of visas when crossing the external borders and those
whose nationals are exempt from that requirement (1), except
where they hold a valid residence permit;
(c) they justify the purpose and conditions of the intended stay,
and they have sufficient means of subsistence, both for the
duration of the intended stay and for the return to their country
of origin or transit to a third country into which they are
certain to be admitted, or are in a position to acquire such
means lawfully;
(d) they are not persons for whom an alert has been issued in the
SIS for the purposes of refusing entry;
(e) they are not considered to be a threat to public policy, internal
security, public health or the international relations of
any of the Member States, in particular where no alert has
been issued in Member States’ national data bases for the purposes
of refusing entry on the same grounds.