Closed Langlais115 closed 1 year ago
As @carlospolop said in https://github.com/JaimePolop/RExpository/pull/3 that grep command on some OS didn't support ?: syntax.
It's probably the same for negative lookbehind as grep on macOSx support only basic regex. Ref: https://superuser.com/questions/639295/is-negative-look-behind-supported-in-osx-grep
UUID also have the same format so to prevent matching uuid. I would use the following regex to prevent false positives.
The following will match your pattern only if it's not preceded by uuid= (case insensitive) It will also save some optimize the memory usage as I remove the group capture. (you should do that for all your pattern actually)
(?i)(?<!uuid=)(?-i)(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})
https://github.com/JaimePolop/RExpository/blob/74ca4898399fb9d39091d3319a73ffe78917a786/regex.yaml#L677C9-L677C71