Hi Greg
I've stuffed it up if 'test' and 'SINGLE item' got highlighted. That was not the intent.
Based on what the OP asked for, I was coding it to only start looking either way if it found a 'word' with at least one digit and letter. If it happens to have a dash at either end then it should extend the selection if the other side of the dash is letters and/or digits.
On those parameters, I would expect to intentionally exclude NNN-123 but catch NN1-123 and NNN-1N2. I would also expect to get most of N1000-2.2 but exclude the other side of the decimal (.2).
I think the code options are all available for the OP so he can do testing and work out exactly what he wants in and out.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|