In reply to Ian Wakeling.

Thanks. The objective was to give another example of using the SUBSTR function, but I like your example. To be more robust, you can include a third argument to the SCAN function so that hyphenated words will be handled correctly.