From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <775b8d190702050220i46066654uae8d624a3d954dee@mail.gmail.com> Date: Mon, 5 Feb 2007 21:20:56 +1100 From: "Bruce Ellis" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] ... --- ... In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Topicbox-Message-UUID: 0d26c27a-ead2-11e9-9d60-3106f5b1d025 hand code that part. it's a bit tricky but not too hard. i've done it dozens of times (got it right 20 years ago and use copy/paste). almost any screwy requirement is best done by just doing it. lex has it's land but it will drive you insane - and in a parallel universe you've finished the C code. ken's code is different to mine but i'd copy/paste it in a second. brucee On 2/5/07, cej@gli.cas.cz wrote: > > hi all, > my problem is to read-in the data in the form(regex): > [0-9]+'-'[0-9]+[acr] > e.g., : 0-2a 3-4c 6-8r > to obtain: > a a a c c [blank] r r r > > Is this better to be solved by 'lex', or directly in C?? Could someone, please, hint??? > > Big 'Thank You', > > Peter. >