From: "John W. Long" Date: 2006-05-25T04:19:51+09:00 Subject: Re: RegExp Problem A LeDonne wrote: > On 5/24/06, A LeDonne wrote: >> >> OK, one more thought. Do you necessarily need it in md[0]? If not... >> >> re = /(['"])(?:.*\1)*(.*\1!)/ >> md = re.match %{ "this looks like "fun"!" } >> p md[1]< "\"fun\"!" >> md = re.match %{ 'this looks like 'fun'!' } >> p md[1]< "'fun'!" >> >> -A > > Better: re = /(['"])(?:.*\1)(.*\1!)/ But the point is to match any quoted expression followed by an exclamation point. The string: %{ "this looks like "fun"!" } Is only to demonstrate an expression that I was having trouble greping. Your expression would require a quote and then a quoted expression followed by an exclamation point--not exactly what I was looking for. -- John Long http://wiseheartdesign.com http://radiantcms.org