Solved

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

Posted on 2011-03-17
3
379 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
ID: 35155699
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 33

Assisted Solution

by:sarabande
sarabande earned 125 total points
ID: 35155825
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
ID: 35156232
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Error while installing rpm 1 82
Arduino EDI - Programming language 3 91
How to learn Linux? 10 60
nested if statement in excel help 4 26
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…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

786 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