Click here to Skip to main content
15,938,218 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a list of strings (CString data type) with me. These are actually file names. From these, how can i select the strings which match a regular expression?
For eg:- if Search pattern = ".", i have to select all strings of the list. if search pattern in "ss", i have to select the strings having "ss" in it.
To be more specific, the list i have is a set of file names.

1 solution

CString does not support regular expressions.
You could use Boost::Regex.
Share this answer
reshmi2000 22-Jul-10 6:45am    
C# is having a Regex library. If i include "using System.Text.RegularExpression" in my C++ code, will i be able to use Regex?
Sauro Viti 22-Jul-10 7:04am    
To do it you should compile your application with CLR; add the using statement is not enough. Search about using CLR and MFC together; however I think it's better if you use a lightweight regular expression library for C++, as the one that _Superman_ suggested you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900