Occasionally I use tools to generate code which include GUIDs. These GUIDs are generated on the fly so they are never the same and thus resulting in changes which git recognizes. Here an example:
IXMLRequestContextType = interface(IXMLNode)
- ['{FA84DA66-04C7-4691-BE38-491BE9C56136}']
+ ['{CB3C3662-B526-46C9-A038-8A3284BCEF73}']
Usually I discard these changes manually but this time I got a 40k+ line file with thousands of changes and I thought this process must be automatable and someone out there must have had the same problem before. While this might be true I couldn't find a solution.
I tried working with git diff --word-diff=plain --word-diff-regex="\{[A-F0-9]{8}\-[A-F0-9]{4}\-[A-F0-9]{4}\-[A-F0-9]{4}\-[A-F0-9]{12}\}"
which seemed promising at first but even with the help of this answer https://stackoverflow.com/a/56090786/6308948 I couldn't (reverse) apply the patch.