Solved

How to use regular expressions in C++ for Linux environment.

Posted on 2011-03-17
3
374 Views
Last Modified: 2012-05-11

Dear experts,

I want to implement regular expressions in C++ for Linux environment. One of my friend recommended me to use REGEX Library by GNU. Could you provide me some documentation as well as code examples about using this library?

BR,
0
Comment
Question by:GurcanK
3 Comments
 
LVL 40

Accepted Solution

by:
evilrix earned 125 total points
Comment Utility
I'd strongly recommend you consider using the regex library that is part of boost. Not only is it a fantastic library it will end up being part of the next version of the CPP standard.

http://www.boost.org/doc/libs/1_46_1/libs/regex/doc/html/index.html
http://en.wikipedia.org/wiki/C%2B%2B0x#Regular_expressions
0
 
LVL 32

Assisted Solution

by:sarabande
sarabande earned 125 total points
Comment Utility
for C development simply do 'man regex' at the shell and you see the syntax for reccomp (compiles a regular expression) and regexec (applies the regular expression). i used it once and had no significant problems.

Sara

0
 
LVL 11

Expert Comment

by:DeepuAbrahamK
Comment Utility
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now