The next day , the regiment pursued the Confederate army and fought in a skirmish at Williamsport .