Several top retailers posted bigger-than-expected sales gains for February, with some benefiting from rising gasoline prices that threaten to curb shoppers' spending in the coming months.

Initial sales results seemed to confirm recent consumer confidence data showing that the U.S. economy remains on solid footing despite the spike in gas prices.

Costco Wholesale Club , teen apparel retailer Zumiez and other chains posted sales results that beat Wall Street's expectations on Wednesday.

Analysts expect the Thomson Reuters index of 25 retailers to show a 3.6 percent rise in sales last month at stores open at least one year.

Most chains in the index will report same-store sales for February, the slowest month of the year for retailers, later on Thursday.

Even if the results meet analysts' high expectations, shoppers are likely to pull back if gas prices keep rising.

Sahana Paramesh, who was shopping Wednesday afternoon at a Ross Stores Inc location in San Francisco, said higher gas prices were making her more careful with her spending.

I used to buy at dressbarn - they had cute little dresses for 30 or 40 dollars, but I just found dresses here for half the price, she said. I probably wouldn't have done that two years ago.

Energy, including gas and electricity, accounted for 5.6 percent of total consumer spending in 2010, according to the Commerce Department.

But warehouse club operators Costco and BJ's Wholesale Inc , which sell gas at many of their stores, on Wednesday attributed their bigger-than-expected sales gains to higher fuel prices.

Oil settled at its highest level since August 2008 on Wednesday.

The Costco and BJ's results also show that many shoppers remain focused on bargains.

We didn't really see anything in February that said to us, 'Boy, consumers are out there and spending,' said John Long, a retail strategist at consulting firm Kurt Salmon.

On the teen retail front, Hot Topic reported its 19th straight month of same-store sales declines, although the 1.4 percent drop was narrower than forecasts. Zumiez's same-store sales rose 12.8 percent, well ahead of expectations.

The S&P Retail Index <.RLX> is up 1.3 percent since the last monthly sales reports, while the S&P 500 <.SPX> has risen 0.1 percent.

(Additional reporting by Alexandria Sage in San Francisco; Editing by Lisa Von Ahn)