From: Morton Goldberg Date: 2006-08-04T07:51:14+09:00 Subject: Re: Non-greediness in a regex - need some help verifying syn I'm not exactly an expert on regexs, to say the least, but I think .*? always matches an empty string and is therefore useless. I would try something like @bigstring.scan(/~\^LNK:[^\t\r\n]*[\t\r\n]+?[^\t\r\n]*\^~/m) I have not test this. Regards, Morton On Aug 3, 2006, at 6:09 PM, Wes Gamble wrote: > I realized I made an error when I did the original post. > > Now my problem is that it won't find any of these occurrences now. > > So @bigstring.scan(/~\^LNK:[\t\r\n]+?\^~/m) isn't returning anything. > My guess is because there are no occurrences of a tab, newline, or > line > feed character _immediately_ after ~^LNK. > > If I do /~\^LNK:.*?[\t\r\n]+?.*?\^~/m - that should pick up what I > want, > correct? > > Wes > > -- > Posted via http://www.ruby-forum.com/. >