I would normally say it's Ascaris judging by the color and size but the segments are unusual. It looks more round than flat and tape worms are usually white or cream colored and flat with protoglids that break off. The worm that fits best is acanthocephala of some type. They are similar to tape worms in that they have a head that burrows into your intestines and they have segments but not protoglids. The head is obviously broken off. I would stick with the flagyl and antibotic since that seemed to kill this one.