RegEx/Git/DiffHeader.regex.txt

# Matches Header information from the output of git diff
(?m)^diff # diff line start
\s--git\s # whitespace, then --git, then whitespace
(?<From>\S+) # From
\s # Whitespace
(?<To>\S+) # To
(?<ExtendedHeader>(?:.|\s){0,}?(?=\z|^index\s{1})) # Until 'index'