diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py
index 4cf65222aea095561547c5bc945fb1f83f01df9c..36c91f66707c0eea7b219e0fc0e2bd61573e5b06 100644
--- a/lib/spack/spack/compilers/clang.py
+++ b/lib/spack/spack/compilers/clang.py
@@ -101,7 +101,7 @@ def default_version(cls, comp):
                 ver = match.group(1) + '-apple'
             else:
                 # Normal clang compiler versions are left as-is
-                match = re.search(r'^clang version ([^ )]+)', output)
+                match = re.search(r'clang version ([^ )]+)', output)
                 if match:
                     ver = match.group(1)