Complex sentence: She served, in disguise, as a soldier in the British Army--first as an infantry man, from 1697 until 1701, and then for five years as a dragoon in the Scots Greys from 1701 until discovered in 1706 while searching for her husband.
Split into simpler sentences: She served, in disguise, as a soldier in the British Army. First as an infantry man, from 1697 until 1701, and then for five years as a dragoon in the Scots Greys from 1701 until discovered in 1706 while searching for her husband.