Regex 的安裝 編譯與使用

2021-04-02 08:52:55 字數 941 閱讀 3671

隔段時間沒沾vc,再回過頭來用regex++時,竟然不知道怎麼安裝了,雖然以前安裝使用的次數多了,但還是沒記住,看來還是好記性不如爛筆頭啊,再總結一次吧。環境: xp+vc6.0(sp6)+ms sdk ,且記環境變數中include的值中ms sdk的位置要先於vc6.0的位置。如:c:/microsoftsdk/include/.;c:/mvs/vc98/atl/include;c:/mvs/vc98/mfc/include;c:/mvs/vc98/include;

注:我機器上vc安裝在了c:/mvs/vc98目錄,你的可能是c:/program files/microsoft visual studio/vc98

ms sdk安裝在了c:/microsoftsdk目錄

然後解壓縮到: c:/regex++

然後進入到dos視窗

cd c:/regex++/libs/regex/build

set msvcdir="c:/mvs/vc98"

nmake -fvc6.mak

nmake -fvc6.mak install

nmake -fvc6.mak clean

note: to add the regex++ library to your project select project | settings.... in the ensuing dialog, select the c/c++ tab. in the category drop down list, select preprocessor. in the additional include directories: edit box enter c:/regex++. now select the link tab. in the category drop down list, select input. in the additional library path: edit box enter c:/regex++.

Regex類的使用。

regex類包括ismatch match matches replace 和 split 等方法。如果使用 和 封閉標記,則指示整個字串 而不只是子字串 都必須匹配正規表示式。1.match方法進行字串的匹配。string input test sina.com 待匹配的輸入串 string pa...

boost中regex的使用

boost是對stl的補充,regex是其中乙個模組。各方法類別很多,本文記錄常用方法。引入標頭檔案 1.regex match regex reg d string str 123 bool b regex match str,reg 2.regex replace string s,regex ...

CBLAS編譯安裝與使用舉例

在github上看到有人用blas library優化自己的原始碼,對此產生了強烈興趣。準備自己動手實踐一下,網上搜尋了一大堆編譯安裝blas教程的資料,沒乙個靠譜的,編譯過程中遇到一堆的問題。因為自己沒有root許可權,所以只能在home目錄中本地編譯使用cblas,然後本地鏈結編譯得到的庫檔案到...