Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UNIX Style "Regular Expressions"

Status
Not open for further replies.

MikeLacey

MIS
Nov 9, 1998
13,212
0
0
GB
Hello all,

At the moment I'm involved in choosing the programming language for a project.

We're choosing between various things, C, C++, Perl, Python, Ruby.

One of the advantages of using something like Perl or Python is the string pattern matching capabilities available in those languages.

So -- My question, after all that waffle:

Is there a C++ library or class that would let us use UNIX Style "Regular Expressions" in a C++ program?
Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884
 
Hello Mike, it may be easier to embed some Perl in your C/C++ project. There is a class available for download from


that will enable you to do this. You'll need to have Perl 5.6 or later installed on the machine when compiling (the end user doesn't need to have Perl installed!).

[idea]
tellis.gif

[sup]programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.[/sup]​
 
I might add that it claims to be faster than grep and supports nearly every type of regex matching you'll find in UNIX (including sed and awk).

Seriously, no C++ programmer should ignore Boost. They're associated with stuff currently in the C++ Standard. Stuff they're doing right now has a high chance of being in the next C++ Standard. Plus they have really awesome stuff. Any serious C++ programmer reading this who hasn't seen Boost: do yourself a favor and go there now.

 
Thanks for pointing that out chipper! I've just visited boost for the first time and I'll be sure to use a lot of the stuff there.

[cyclops]
tellis.gif

[sup]programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.[/sup]​
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top