Regular Expressions

A

alexrixhardson

Dear fellow developers,

I am looking for a good regular expressions handling library. Am
developing an application under Fedora Linux and putting "include
<regex.h>" in my code does not make my compiler complain. I assume
this is the library documented in http://www.opengroup.org/onlinepubs/000095399/basedefs/regex.h.html
document. However I am wondering whether regex.h library is okay, or
would you guys recommend me to use something else (Boost RegEx
libraries for example?)?

Cheers,
Alex
 
E

Erik Wikström

Dear fellow developers,

I am looking for a good regular expressions handling library. Am
developing an application under Fedora Linux and putting "include
<regex.h>" in my code does not make my compiler complain. I assume
this is the library documented in http://www.opengroup.org/onlinepubs/000095399/basedefs/regex.h.html
document. However I am wondering whether regex.h library is okay, or
would you guys recommend me to use something else (Boost RegEx
libraries for example?)?

The next version of the C++ standard will include a regex library, and
while I have not checked I am quite sure that it will be based on Boost
RegEx, so going that way will probably ensure forward compatibility.
 
P

Pavel Shved

(e-mail address removed):
Dear fellow developers,

I am looking for a good regular expressions handling library. Am
developing an application under Fedora Linux and putting "include
<regex.h>" in my code does not make my compiler complain. I assume
this is the library documented in http://www.opengroup.org/onlinepubs/000095399/basedefs/regex.h.html
document. However I am wondering whether regex.h library is okay, or
would you guys recommend me to use something else (Boost RegEx
libraries for example?)?

Don't reinvent the wheel. Linux has powerful methods to allow
processes to communicate effectively. Start a perl program that will
parse text with perl's regular expressions, and then read its output
from your C++ program. With a little effort you get your solution and
bonus of parallelized and syncronized processes of parsing text (perl
program) and handling parsing results (C++ program).
 
R

Ron Natalie

There are two good open source regex libraries. For C++
the boost regex library is probably as good as it gets.

If you want an older UNIX C-style regex Henry Spencer
wrote one decades ago at University of Toronto that's
still making the rounds (and a lot of other regex stuff
is lifted straight from it).
 
D

Dave Rahardja

(e-mail address removed):

Don't reinvent the wheel. Linux has powerful methods to allow
processes to communicate effectively. Start a perl program that will
parse text with perl's regular expressions, and then read its output
from your C++ program. With a little effort you get your solution and
bonus of parallelized and syncronized processes of parsing text (perl
program) and handling parsing results (C++ program).

I don't see how using an existing library is reinventing the wheel.

-dr
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top