Hello, thanks for the query. Pulling of a string type things from the anus may be Ancylostoma
duodenale or Necator americanus. These both are from of hookworms , a type of worm which found in the human intestine and came out in your case. Its ova may be in your intestine so you should take anti worm drugs after consulting the doc. Before this your's stool should be examined by some lab so that proper diagnosis could be confirmed. Thanks and good luck.