“People who have something really private to say probably shouldn’t do it in a text on their cellphone,” said Marc Rotenberg, executive director of the Electronic Privacy Information Center, a public interest research group based in Washington.

In Mr. Woods’s case, Jaimee Grubbs, who has worked as a cocktail waitress, came forward with text messages that she said were from Mr. Woods once he was rumored to be having marital problems after he slammed his car into a fire hydrant and a tree on Thanksgiving. Since then, several other women have said they, too, slept with Mr. Woods. He has said in a statement only that he was sorry for his “transgressions” and asked that his family be left alone.

“Personal sins should not require press releases, and problems within a family shouldn’t have to mean public confessions,” Mr. Woods said.

Others, like Kwame Kilpatrick, the former mayor of Detroit, were found out because they used government-issued mobile phones and pagers. Mr. Kilpatrick lied under oath about having an affair with an aide, but his text messages revealed the truth. Nevada’s governor, Jim Gibbons, was accused last spring by his wife in divorce documents of sending more than 800 text messages to a mistress in 2007. He contended that the woman was a friend, but he paid the state $130 for the messages from his phone.

What is more common, though, is suspicion followed up by a confrontation. Doug Hampton, a longtime friend and employee of Senator Ensign’s, said recently on the ABC show “Nightline” that he was alarmed after he had borrowed Mr. Ensign’s cellphone in late 2007 to call his wife, Cynthia Hampton, and found her listed as “Aunt Judy.” Mr. Hampton said he found an incriminating text message and confronted the pair about their affair at a Christmas dinner soon after.

Image Senator John Ensign, Republican of Nevada, had an affair with a former employee that was confirmed when the woman's husband found an incriminating text message. Credit... Brendan Smialowski for The New York Times

In a recent survey of 2,300 adults about social networking, the Pew Internet and American Life Project found that 12 percent said they had shared information online that they later regretted posting. Posting on a social network is not the same as sending a text message. But Lee Rainie, director of the Pew project, contends it is evidence of an overall cultural shift in which people have become increasingly careless about revealing personal information they cannot take back.