On Thu, 2007-01-18 at 13:33 +0100, Alex R. Mosteo wrote: > Hello, > > before filing a bug report I'd like to hear your opinion to rule out a > mistake on my part. I'm using the excellent Gnat.Spitbol.Patterns package > to extract some patterns from large bodies of text. I'm doing it with this > scheme: > > declare > Text : aliased Vstring := ; > Target : aliased Vstring; An ad hoc: I ran into trouble when forgetting to initialize unbounded strings to the null string. Nul in the case of Target, I think. > > Patt : constant Pattern := Some_Patterns ** Target; > begin > while Match (Text, Target, "") loop Patt ? > -- This extracts a Target string and removes it from the text. > -- It doesn't matter if the surrounding text causes new aftermatches. > Do_Something_With (Target); > end loop; > end;