On gov.uk's Standard Visitor visa page it is indicated
Check if you need this visa if you’re visiting from outside the European Economic Area (EEA) or Switzerland"
“Visiting from” makes you understand that the country you regularly live in is relevant, thus you can avoid applying for a visa if you are visiting from Italy (as country of regular residency).
As a matter of fact, if you proceed to make the check, the question to answer is "What passport or travel document do you have?", not really consistent with the indication previously given.
So, what is relevant: the country you live in with regular documents (and where you leave from to visit UK) or the country of origin which issued the passport?
To be practical, a Moldovan who is an Italian resident with regular resident card and Italian ID card (but with the note "not valid for expatriation") can avoid applying for a visa if he wants to spend a week-end in London (thus visiting from inside EEA)?