Hi,

At Tue, 19 Aug 2003 20:03:28 +0900,
Domingo Alvarez Duarte wrote:
> I have been using strscan till version 0.65 and it was working with a
> code like this but now trying to upgrade to ruby 1.8 it doesn't, is
> there a bug in strscan or I misunderstood it ?

StringScanner has the "cursor" internally, and always tries
matching at the position.  In other words, it never skip
unmatched portion.

> SSI_search_re = /<!--#(.+?)#-->|\[\)(.+?)\(\]/m
> res = parse('<html><!--# . vvvvcartasvvvv . #--><body>Hello
> [)Domingo(] !</body></html>')

This string doesn't start with the part matches to the RE.

  SSI_search_re = /.*?(?:<!--#(.+?)#-->|\[\)(.+?)\(\])/m

may works but I'm not sure if it is what you really want.

-- 
Nobu Nakada