在linux下須要對正則表達式的驗證,使用的驗證工具是pcretest,這個工具集成在pcre庫中,下面是安裝教程。linux
安裝環境是centos7.正則表達式
1)首先去官網下載壓縮包文件。centos
其餘的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)進入該目錄,運行configurecentos7
cd pcre-8.13 ./configure --enable-utf8
4) 執行make命令spa
make && make intall
OK !code