BOOST 사용법은 example받으시면 있을 텐데... 간단히 요약해 보면요.
.다음을 추가
#include <boost/regex.hpp>
using namespace std; // STL과 일반적으로 같이 사용하므로 필요
using namespace boost; //
.다음과 같은 표현식을 지정 * ()로 포함된 부분이 match를 통해 값이 넘어 온다.
const char * re = "g ([0-9\\.]{1,8}) ([0-9\\.]{1,8}) m ([0-9\\.]{1,8}) ([0-9\\.]{1,8}) -([0-9\\.]{1,8}) ([0-9\\.]{1,8}) ([FT] [FT]) ul G";
regex expression(re); //
.cmatch를 지정
cmatch matches;
.다음과 같은 search문이나 match문등을 사용
BOOL bFound = boost::regex_search (pbuff, matches, expression);
매치문을 사용
newvalue.assign(matches[0].first, matches[0].second);
Original Link : http://blog.naver.com/sasimy18?Redirect=Log&logNo=120024853765
.다음을 추가
#include <boost/regex.hpp>
using namespace std; // STL과 일반적으로 같이 사용하므로 필요
using namespace boost; //
.다음과 같은 표현식을 지정 * ()로 포함된 부분이 match를 통해 값이 넘어 온다.
const char * re = "g ([0-9\\.]{1,8}) ([0-9\\.]{1,8}) m ([0-9\\.]{1,8}) ([0-9\\.]{1,8}) -([0-9\\.]{1,8}) ([0-9\\.]{1,8}) ([FT] [FT]) ul G";
regex expression(re); //
.cmatch를 지정
cmatch matches;
.다음과 같은 search문이나 match문등을 사용
BOOL bFound = boost::regex_search (pbuff, matches, expression);
매치문을 사용
newvalue.assign(matches[0].first, matches[0].second);
Original Link : http://blog.naver.com/sasimy18?Redirect=Log&logNo=120024853765
'Windows > MFC' 카테고리의 다른 글
How to install and use Boost (My version for vs8) (0) | 2013.10.02 |
---|---|
How to install and use Boost (0) | 2013.10.02 |
Two Connecting Example by CMyAdoConn (0) | 2013.10.02 |
County Code by MSDN (0) | 2013.10.02 |
CListCtrl & Tooltip TitleTip (0) | 2013.10.02 |