没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
vc6可利用boost库使用正则表达式。支持vc6的最高boost版本是1.34.1。很多人编译boost库遇到这样那样的问题。这个是我编译好的库,直接解压后,在vc中设置好include和lib路径即可使用。 测试程序: #include <cstdlib> #include <stdlib.h> #include <boost/regex.hpp> #include <string> #include <iostream> using namespace std; using namespace boost; int main( int argc, char * argv[]) { regex expression_r_r_r_r( " (\\d+)-(\\d+)-(\\d+) " ); // 注意转义方式 string in ( " Today: 2007-06-23 " ); cmatch what; // 如果用 regex_match 方法将需要完全匹配, // 不能在字符串中找寻模式,可用于验证输入 if (regex_search( in.c_str(), what, expression_r_r_r_r)) { for ( int i = 0 ;i < what.size();i ++ ) { cout << " str : [" << what[i].str() << "]" << endl; } } return 0 ; }
资源推荐
资源评论
资源评论
- sanqima2019-03-04该资源在windows xp下可以使用。
- blueicescape2018-07-20win7 下 vc++6 可以用
auserpass
- 粉丝: 0
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功