emanuele6 1628891108 learn \s "works", on GNU/Linux, when used as `re='\s'; [[ $string =~ $re ]]', but that is only because bash uses regcomp() to implement =~ and the underlying GNU libc adds to EREs \s as an extension. This is not guaranteed to work on all systems; you should stick to POSIX EREs as the bash manual says. [[ $string =~ [[:space:]] ]]