C regex equiv to Python implementation?

T

techiepundit

I've been writing code in Python to prototype part of an application.
I've used the re regular expression pattern matcher. Now I have to take
what I've written and recode it in C to fit in an existing C app.

Anyway, is there a way to use the re regular expression evaluator in C?
Is it written in C?

Or does anyone know of a similar one that does search and match in
close to the same fashion with begin and end values returned?
 
G

Ganesan Rajagopal

techiepundit said:
I've been writing code in Python to prototype part of an application.
I've used the re regular expression pattern matcher. Now I have to take
what I've written and recode it in C to fit in an existing C app.

What platform? Linux includes a regex(7) implementation in the C
library. However, it doesn't support many of the extensions that Python
regexes support. Try http://www.pcre.org/. There are pre-build binaries for
Windows also.

Ganesan
 
T

techiepundit

Ganesan,

I'm trying to stay portable between Windows and Linux. My app will run
on Linux when deployed. But we do a lot of simulation on Windows
because of better dev tools available on Windows.

So I really want a regular expression implementation that'll compile
under MS VS 2003 C++ and also under Gnu C++ for Linux on both x86 and
ARM targets.
 
J

Jorgen Grahn

Ganesan,

I'm trying to stay portable between Windows and Linux. My app will run
on Linux when deployed. But we do a lot of simulation on Windows
because of better dev tools available on Windows.

(Lots of people seem to do so, and I can't understand why. I tend to
translate that to "we're not comfortable with working on our target
platform" ...)
So I really want a regular expression implementation that'll compile
under MS VS 2003 C++ and also under Gnu C++ for Linux on both x86 and
ARM targets.

Read the parent posting again. He recommended PCRE as the best compatible
solution. It would surprise me /a lot/ if that didn't compile on Windows.

/Jorgen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top