In teaching REs, I use grep and recently noticed the colors highlight all possible matches, not the one match as per POSIX's rules:
echo 'abcdefabc' | grep '[abc]' Should highlight only the first "a" (earliest match has precedence, than longest). Instead, every "a", "b", and "c" is highlighted. It would be my guess that grep historically didn't need to know exactly what matched, just that something did, so the code doesn't bother to apply any rules to determine exactly what matched. I don't mind the current behavior as a default, but there should be some option to force grep to only highlight the one match, as per BRE/ERE/PCRE rules of precedence. -- Wayne Pollock Please Note: Due to Florida's very broad public records law, most written communications to or from College employees regarding College business are public records, available to the public and media upon request. Therefore, this email communication may be subject to public disclosure.
