The Git source uses regcomp and regexec , which are defined by POSIX 1003.2. Code for compiling diff regexp :
if (regcomp(ecbdata->diff_words->word_regex, o->word_regex, REG_EXTENDED | REG_NEWLINE))
which in POSIX means that these are "extended" regular expressions, as defined here .
(Not every C library actually implements the same POSIX REG_EXTENDED . Git includes its own implementation, which can be built in place of the system.)
Edit (in updated question): EOS POSIX have neither look nor lookbehind, and they do not have \w (but [_[:alnum:]] is probably close enough for most purposes).
torek source share