diff --git a/Library/Homebrew/extend/os/linux/hardware/cpu.rb b/Library/Homebrew/extend/os/linux/hardware/cpu.rb
index 0ef9c695dc2b601ce0855e0c08c7cf70822bf69d..9f4413ed9879e0b6344bf80b3fcfdad3adfc9990 100644
--- a/Library/Homebrew/extend/os/linux/hardware/cpu.rb
+++ b/Library/Homebrew/extend/os/linux/hardware/cpu.rb
@@ -69,8 +69,9 @@ module Hardware
         end
       end
 
+      # Supported CPU instructions
       def flags
-        @flags ||= cpuinfo[/^(flags|Features).*/, 0]&.split
+        @flags ||= cpuinfo[/^(?:flags|Features)\s*: (.*)/, 1]&.split
         @flags ||= []
       end