OSX ‘expr’ is built on BSD expr, which does not contain the ‘index’ directive.  This work around allows this test to work on OSX and linux.
Updated comparison to work on Linux as well as OSX.
Updated comparison to work on Linux as well as OSX.
Having problems finding a syntax that works for both OSX and Linux, added a platform check instead. Perhaps this will work.