From: "Wolfgang Nádasi-Donner" Date: 2007-01-20T06:45:05+09:00 Subject: Re: Regexp.newbie? Hope there is one solution O.K. for you. >>>>> Code >>>>> mylines = <>>>> Results >>>>> ########## Without last Z-Record ########## A......1 M..... d.... ---------- A....1 r.... f.... ---------- A.....1 c.... t.... ---------- ########## Last Record up to EOF ########## A......1 M..... d.... ---------- A....1 r.... f.... ---------- A.....1 c.... t.... Z..... ---------- ########## Includings last Z-Record ########## A......1 M..... d.... ---------- A....1 r.... f.... ---------- A.....1 c.... t.... Z..... ---------- >>>>> End >>>>> Wolfgang Nádasi-Donner