From this site at the bottom of the page:
"Saving Tomato Seed:
1. Use tomatoes that are edible ripe – NOT overripe or rotting.
2. Label a Dixie cup with the name of the tomato
3. Cut the fruit in half and squeeze the contents into the cup- seeds, juice, pulp and all
4. Place the cup in the shade in a covered area outside or in a garage or shed – it will really smell bad and attract fruit flies!
5. After about 3 days, once a white fungus layer forms, add water to fill the cup – carefully remove the fungus layer and discard. Pour the contents into a fine mesh sieve and, with water running over the seed mass, press with a spoon so that everything but the seeds passes through the mesh.
6. Scrape out the cleaned seed, spread onto a labeled unglazed paper plate and let air dry in the house for about 2 weeks.
7. Tomato seeds, if stored in glass or plastic vials, will last 10 years or more, stored at room temperature."
When weeding, the best way to make sure you are removing a weed and not a valuable plant is to pull on it. If it comes out of the ground easily, it is a valuable plant.