Page 1 of 1

using POCO::RegularExpression?

Posted: 22 Jun 2012, 05:14
by dandan607
I just begin to learn POCO library,and face a simple question.I need an answer,Thank you very much.

How can I find out the word such as "SQUARE_RED_1" that contains the word "SQUARE" using POCO::RegularExpression?

Re: using POCO::RegularExpression?

Posted: 23 Jun 2012, 14:30
by pasorobo
dandan607 wrote:I just begin to learn POCO library,and face a simple question.I need an answer,Thank you very much.

How can I find out the word such as "SQUARE_RED_1" that contains the word "SQUARE" using POCO::RegularExpression?



Check Foundation's sample "grep" please.

If you need even simpler example usages, check RegularExpression's testcases.

Jiang

Re: using POCO::RegularExpression?

Posted: 23 Jun 2012, 17:53
by alex
dandan607 wrote:How can I find out the word such as "SQUARE_RED_1" that contains the word "SQUARE" using POCO::RegularExpression?

You have a problem. You choose to use regular expressions to solve it. Now you have two problems :).

Jiang gave you good pointers above. Your problem is not POCO-related; you should start by learning how regexp works.