* [9fans] ... --- ...
@ 2007-02-05 10:03 cej
2007-02-05 10:20 ` Bruce Ellis
0 siblings, 1 reply; 2+ messages in thread
From: cej @ 2007-02-05 10:03 UTC (permalink / raw)
To: 9fans
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [9fans] ... --- ...
2007-02-05 10:03 [9fans] ... --- cej
@ 2007-02-05 10:20 ` Bruce Ellis
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ellis @ 2007-02-05 10:20 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
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 <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.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-05 10:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-05 10:03 [9fans] ... --- cej
2007-02-05 10:20 ` Bruce Ellis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).