Hello,
why test returns "clean" what is marked in red in belongs strings comparison?
Code:
# d=274y82heE
# [[ $d =~ [^[:alnum:]] ]] && echo "not clean $d" || echo "clean $d"
[COLOR=#4E9A06]clean 274y82heE[/color]
# d=274y82he^E
# [[ $d =~ [^[:alnum:]] ]] && echo "not clean $d" || echo "clean $d"
[COLOR=#4E9A06]not clean 274y82he^E[/color]
# d=/one/ssfdsf/274y82he^E/end/end
# [[ $d =~ /one/ssfdsf/[^[:alnum:]]/end/end ]] && echo "not clean $d" || echo "clean $d"
[COLOR=#EF2929]clean /one/ssfdsf/274y82he^E/end/end[/color]
# [[ $d =~ /one/ssfdsf/[[:alnum:]]/end/end ]] && echo "not clean $d" || echo "clean $d"
[COLOR=#EF2929]clean /one/ssfdsf/274y82he^E/end/end[/color]
# [[ $d =~ ^/one/ssfdsf/[[:alnum:]]/end/end ]] && echo "not clean $d" || echo "clean $d"
[COLOR=#EF2929]clean /one/ssfdsf/274y82he^E/end/end[/color]
# [[ $d =~ ^/one/ssfdsf/[[:alnum:]]/end/end$ ]] && echo "not clean $d" || echo "clean $d"
[COLOR=#EF2929]clean /one/ssfdsf/274y82he^E/end/end[/color]