U.S. stocks edged lower on Wednesday as investors pulled back following a five-month rally that pushed the market to 2-1/2-year highs.

Underscoring concern about the job picture, Federal Reserve Chairman Ben Bernanke told a congressional committee that the labor market remains sluggish and he continues to believe that inflation will remain subdued. Wall Street's reaction to Bernanke's comments was muted.

Still, shares of exchanges rose after news that Deutsche Boerse was in advanced merger talks to tie up with NYSE Euronext .

NYSE shares jumped 14.6 percent to $38.30. Rival exchanges also jumped on the news, including the CBOE Holdings Inc up 4.5 percent at $25.58, as investors eyed further matchups.

The day's overall dip comes after the Dow logged its seventh consecutive positive finish. It also reached another multiyear high above the 12,200 level, while the S&P 500 is up 26 percent since the start of September. Both the Dow and S&P 500 are at 2-1/2-year highs.

We've gone up so many days, the market is probably due for a pause, said Henry Smith, chief investment officer at Haverford Trust Co. in Philadelphia.

But investors should use the dips as a chance to pick up shares, he said, since the longer-term outlook for stocks is up.

While we fully expect pullbacks to occur through the year, they're going to be used as a buying opportunity because sentiment has shifted to anxiety, and the anxiety is, 'We're missing a bull market,' he said.

Trading volume was at 3.75 billion shares by midday. Wall Street's Tuesday volume was the lowest of the year at 6.99 billion shares, compared to last year's daily average at 8.47 billion.

The Dow Jones industrial average <.DJI> was down 27.93 points, or 0.23 percent, at 12,205.22. The Standard & Poor's 500 Index <.SPX> was down 7.01 points, or 0.53 percent, at 1,317.56. The Nasdaq Composite Index <.IXIC> was down 10.31 points, or 0.37 percent, at 2,786.74.

Blue chips slightly outperformed the broader market, helped by strong earnings from Coca-Cola and Walt Disney.

Walt Disney Co after the bell on Tuesday reported its profit surged 54 percent, topping expectations. Its shares were up 5 percent at $43.23. Coca-Cola shares were up 0.4 percent at $63.14 after the company reported higher-than-expected quarterly sales.

In the financial sector, shares of Wells Fargo & Co dropped 3.8 percent to $32.79 after the bank said its chief financial officer will retire. The structure of the CFO's retirement raised questions, analysts said.

(Reporting by Caroline Valetkevitch, additional reporting by Angela Moon; Editing by Leslie Adler)