We use 26ft Flexi's. Trust me, I'd rather have a fence, but it's a townhouse and we can't. They go outside ONLY (yes even at night, in the rain, etc.
) and it works pretty well. They just have to walk past the porch & sidewalk to the grass and they can run about 10 feet back and forth if they want to. Mostly they pee as soon as they hit the grass, but sometimes they decide to push the boundaries a little and see how far the leash will let them go. Generally if they just want to go out and sniff we just take them for a walk and then they get it out of their system.
Also, mine have had training but terriers are not the most reliable outside - at least mine aren't! Sammy has only had 1 class and she will come if you are outside WITH her. Loki has had TONS of training, but outside he would run after another dog before listening to me. And Sam would run after a squirrel. It's not worth risking... we do our best to keep them on leashes at all times.