I added a bunch of snails to my tank, so I decided it was time for the worm to go. I used the trap that olemiss posted. It took nearly two hours of watching and waiting, but it eventually worked. The first attempt, about 45 minutes after putting the trap in, I pulled the snare with a tiny bit of the worm's tail still sticking out of the trap. I didn't pull the snare tight enough, or the snare wasn't around the worm, and the worm retreated. Second attempt took over an hour, because my shrimp kept coming to investing the aroma and scaring the worm off. This time, I waited for a couple minutes after the end of the tail disappeared into the trap before pulling the snare, and success!
My worm was small in comparison to the worm in the trap link; maybe 8" stretched out. I suspect that the reason why it was coming out during the day is because I didn't have anything on it's regular menu in the tank, so it was left to scavenge uneaten food, which is more plentiful during the day.
I thought about taking out the rock it was living in, but I don't have extra rock, and two of my fish hide in that rock at night.