From: "Ponto André" Date: 2008-11-29T08:14:26+09:00 Subject: regex for capturing images ok, i've written this regex: /(https?:(?:/*\w*\.*-*)*(?:\.gif|\.jpg|\.bmp|\.png|\.jpeg))/i i've tested it on rubular. and for this example text:

some text

rubular outputs me this: Match captures: Result 1 1. http://sub-domain.domain.net/path/folder/figurename1010.jpg Result 2 1. http://sub-domain.domain.net/path/folder/thum/figurename1010-thumb.jpg but in my code: matchdata = text.match(/(https?:(?:\/*[a-zA-Z]*\.*-*\d*)*(?:\.gif|\.jpg|\.bmp|\.png|\.jpeg))/i).captures puts matchdata.size size prints me "1". am i capturing wrong? -- Posted via http://www.ruby-forum.com/.