在linux下需要對正則表達式的驗證,使用的驗證工具是pcretest,這個工具集成在pcre庫中,下面是安裝教程。
安裝環境是centos7.
1)首先去官網下載壓縮包文件。
其他的source網站需要牆,點擊https://www.pcre.org/,我使用的ftp下載的,https://ftp.pcre.org/pub/pcre/pcre-8.13.tar.gz
wget https://ftp.pcre.org/pub/pcre/pcre-8.13.tar.gz
2)解壓縮
tar -xzvf pcre-8.13.tar.gz
3)進入該目錄,運行configure
cd pcre-8.13 ./configure --enable-utf8
4) 執行make命令
make && make intall
OK !