regex

R

Raghavendra Mahuli

Hi group,

I am using regular expression functions regex and regcmp to validate some
record which are of the form-

REC1{ 'Bsgf' | 'Cjsdg' | 78 }

That is a fairly simple job.
But i have to extend it to handle nested records say like a record REC2
which contains REC1

like :

REC2{'sjsd' | 2 | REC1{'Bsgf' | 'Cjsdg' | 78 }| REC2{ 'Bsgf' | 'Cjsdg' |
78 }}

Now the number preceding the nested record tells how many records will be
present. In this case, it is 2.

Can u pls suggest some way to handle nested regular expressions. or is there
some type in STL to handle it?





Thanks in advance
 
M

mlimber

Raghavendra said:
Hi group,

I am using regular expression functions regex and regcmp to validate some
record which are of the form-

REC1{ 'Bsgf' | 'Cjsdg' | 78 }

That is a fairly simple job.
But i have to extend it to handle nested records say like a record REC2
which contains REC1

like :

REC2{'sjsd' | 2 | REC1{'Bsgf' | 'Cjsdg' | 78 }| REC2{ 'Bsgf' | 'Cjsdg' |
78 }}

Now the number preceding the nested record tells how many records will be
present. In this case, it is 2.

Can u pls suggest some way to handle nested regular expressions. or is there
some type in STL to handle it?





Thanks in advance

If you're not using std::tr1::regex or boost::regex
(http://boost.org/libs/regex/doc/index.html) your post is off-topic
here, and you'll need to seek help from your library vendor. If you are
using TR1/Boost's regex classes, please show us some code for what you
have so far, and perhaps we can suggest something.

Cheers! --M
 

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,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top