Re: Regular Expressions in C
From: Pierre Asselin (pa_at_invalid.invalid)
Date: 05/08/04
- Next message: Joe Cipale: "getpid/kill question"
- Previous message: Michal Wojciechowski: "Re: How to invoke 2.9.5.3 behavior from 3.2.3 of GCC"
- In reply to: Thomas Deschepper: "Regular Expressions in C"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 7 May 2004 20:05:28 -0400
Thomas Deschepper <thomas.deschepper.ecol@sintjozefscollege.be> wrote:
> Some time ago, I learned some Perl and I read the Llamabook. I found out
> that Perl had a cool and relative simple work method for extracting data
> from a string provided by the user using regular expressions and match
> variables.
> Now, I want to achieve the same but this time in C. How can I "parse" a
> char array and get the things I need. Let me illustrate with an example.
man regcomp .
> Say I wanted to parse a mathematical function to plot it on the screen.
> The user could provide me with the following string:
> y = 5*x + 5
> or
> y=5 * x+ 5 (extra spaces)
Uh, maybe you want more than regular expressions. Investigate lex and
yacc (or flex and bison).
- Next message: Joe Cipale: "getpid/kill question"
- Previous message: Michal Wojciechowski: "Re: How to invoke 2.9.5.3 behavior from 3.2.3 of GCC"
- In reply to: Thomas Deschepper: "Regular Expressions in C"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|