Consumer confidence in the U.K. rose in May, a widely followed survey said Wednesday, with shoppers shrugging off both Brexit concerns and general election uncertainty.

GfK's long-running Consumer Confidence Index came gained two points to -5 in May, with four of the five measures increasing, the group said. Consumers are feeling more confident about their personal finance and the general economic situation compared with April and were also were also more confident in making major purchases.

Although the index remains in negative territory, the significant fall expected from last year's vote to leave the European Union has not yet come to fruition, GfK said.

"Despite life becoming more expensive with inflation hitting its highest level in four years, and wages dropping in real terms for the first time in three years, stagnant living standards haven't yet significantly dented consumers' spirits - when it comes to retail therapy we remain happy to splash the cash as sales jump ahead of expectations," GfK Head of Market Dynamics Joe Staton said in a statement.

Inflation in the U.K. hit its highest level since September 2013 in April, hitting 2.7%, according to the Office for National Statistics, up from 2.3% in March, and well above the Bank of England target of 2%.

The BoE expects inflation to peak at just below 3% by the end of this year.

The FTSE 350 General Retailers Index has gained 2.44% since the beginning of the year, compared with a 5.37% increase for the FTSE 100.