From: Jon Fi Date: 2007-03-31T00:43:58+09:00 Subject: Re: Regex Black Magic... how to stop matching if char? Robert Klemme wrote: > On 30.03.2007 17:34, Jon wrote: >> >> >> >> >> ..because there is no gauranteed whitespace between tags. Basically, I >> need to stop matching if a ">" is found. I've never had to deal with >> anything quite like this in my regex experience. Any help or thoughts of >> a better way to do things is much appreciated! > > I can think of several solutions: > > /<([^>\s]+)\s+(\d+):(\d+)>/ > > Or even a two phased approach > > /<[^>]+>/ > > and then with the match > /(\d+):(\d+)>\z/ > > HTH > > robert awesome, and thank you! but for my benefit, could you explain why that works? I thought ^ was line start? -- Posted via http://www.ruby-forum.com/.