# zmodload zsh/pcre # pcre_compile -i "^\\w+\\s+(\\d+)\\s*\$" # pcre_study # pcre_match -a ary "test 2128506" # print -l $ary 2128506 # [[ "2128506" -pcre-match (?:\\d\\d\\d)[-\\s]*(?:\\d{4}) ]] && \ print yes yes #