>>Just in the third part... like this:
>>
>>
+ CHRTRAN(GETWORDNUM(mstr, 3, ':'), '-=_', '...')
>
>I understood that bit
>
>I'm just not too keen on chrtran() anything after the second colon
Me too. I had a similar case, when I needed to import something and add a "(1)" to its caption if it already existed, or "(n+1)" if "(n)" existed. Which was easy, I thought, just find anything in parentheses, remove it and run a SQL with " caption like 'title without parentheses%+ and ...". Which worked swimmingly until there was one caption with a word in parentheses in the middle.
So I had to amend my code to look for rat("(", caption, 1), chop the string to the right, then see if that contained digits, then remove that string (and the parentheses) and leave anything to the left intact.
Every time I had to do such manipulation on man made strings, I took it as a little disaster biding its time. People just don't understand the rules set there, and why would this or that break one of those. Keeps us in business forever.