On Jan 18, 2017, at 7:48 AM, Greg Troxel <gdt%lexort.com@localhost> wrote: I agree that simple is best. Given that nobody seems to have noticed the problem until now, I feel that matching the second word of the version string is basically the correct idea. The problem is that the regular _expression_ in use does not match the second word, it matches the last because the first group is greedy and can include spaces. I believe a better one would be the following, which is more explicit about eliminating spaces (and tabs just to be more general) within the capture groups: s/^[[:blank:]]*\([^[:blank:]]\{1,\}\)[[:blank:]]\{1,\}\([^[:blank:]]\{1,\}\).*$$/\2/ This works on my Mac (which is using nbsed as ${SED} within pkgsrc). I hope it works elsewhere, but perhaps those with better understanding of different versions of sed can chime in. The simplest solution would be to replace the existing regex with something like the one above. Thoughts? Cheers, Brook |