, - ( ?) (: ), Bash: grep -Eq, :
if echo "$candidate_password" | grep -Eq "$strong_pw_regex"; then
echo strong
else
echo weak
fi
Bash 3 =~:
if [[ "$candidate_password" =~ "$strong_pw_regex" ]]; then
…
fi
regexp grep -E Bash , , . , , , - Ruby Perl Bash.
, Bash (${#candidate_password} candidate_password), . .