Rand Simberg disagrees with my warnings about dismissing too easily the capabilities of the Arabs in their fight against the US.
But the main reason they put up such a good fight for so long was not because of fanatical bravery and devotion to their cause (though they had that in abundance)--it was vastly superior generalship, until Grant was put in charge. And while the South had some brilliant generals, this is more of a commentary on the poor quality of those of the Union, most notably McClellan, who threw away opportunity after opportunity to follow up a battlefield victory with the destruction of Lee's army, instead always failing to follow through and pursue.
The South had its share of incompetent leadership early in the War, some of whom went on to far greater reputations than their actions merited. For example, you mentioned Stonewall Jackson. Had he acted in accordance with his orders during the Seven Days Campaign, there is a very good possibility that the Union Army would have been crushed, and the war ended early. However, he failed to act, and an opportunity was lost. Throughout the early years of the war, both sides failed to capitalize on opportunities which presented themself. Another example is the aftermath of the battle of Chickamauga, where again, the opportunity to throw the Union Army out of Middle Tennessee was lost.
However, If you find the War Between the States a strained analogy, try this one, also from American History. In the Revolutionary War, America faced a well trained, well equipped, and certainly well led army, and still emerged victorious, despite losing nearly every major engagement. The British were hampered by several factors, including the length of their suppply lines, trying to operate in a terrain which they were unfamiliar with, operating in a land where friend and enemy looked alike, and allegiances shift with the tide of the battle. The US adopted tactics which made victory for the British Empire more costly than they felt it was worth.
We have to ask ourselves this question, "Who has the greater will to win in this conflict? Who is fighting for their "lives, fortunes and sacred honor" this time? The Arabs, through Operation Desert Storm, and again in Afghanistan have shown the ability to avoid pitched encounters, to melt away before pressure can be brought to bear, thus preserving men and equipment to continue fighting later on. The US could very well get into a conflict like a bear battling a hive of bees. All of his power is useless because it can't be brought to bear on the target in an effective manner.