WIP | 검색 모듈(search module)의 소스를 공개합니다. (유니코드 버전)
페이지 정보
작성자 CmdList 작성일17-07-27 15:23 조회3,665회 댓글0건첨부파일
-
search_module.zip (1.4K) 78회 다운로드 DATE : 2017-07-27 15:23:42
관련링크
본문
File List:
1. search.cpp
2. search.h
Usage:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #include <iostream> #include "search.h" int main() { std::wstring text = L"TEXT 1234"; std::wstring pattern_wildcard = L"^t*xt 1?34"; std::wstring pattern_regex = L"^t.xt .*34"; search_module sch; // search with regex sch.pattern(pattern_regex); if (sch.search(text, true) == true) std::cout << "regex match : " << "true"; else std::cout << "regex match : " << "false"; // search with wildcard sch.pattern(pattern_wildcard); if (sch.search(text, false) == true) std::cout << "wildcard match : " << "true"; else std::cout << "wildcard match : " << "false"; } | cs |
댓글목록
등록된 댓글이 없습니다.