I know that's super confusing (total noob-sorry!). To clarify, I have a text file that looks like this:
407-OL?
408-2-OL?
408-OL?
418-het?
420-1 and 2- OL?
429-2-left unscored?
430-2-left both unscored?
431-1 and 2- Ri??
436-1-just homozygote?
444-2-het? ins. both
456-2-ins 246 despite slight OL
456-1-ins 245 (weaker)
457-2-Ri?
I want it to return the numbers on the left (before the dash), but only for lines that contain a question mark. In other words, I want this to be the output:
407
408
408
418
420
429
430
431
436
444
457
Any suggestions would be amazingly helpful! Thank you!

sedto English would be. – jw013 May 7 '12 at 1:18