Terry, that's really very kind of you to go to so much trouble. I appreciate it very much. As you can imagine I tried it straight away but unfortunately when I ran it, it just hung. Still, I'll study your script in detail and hopefully learn from it.
Maybe an example of what I'm hoping to do will help. I have 3 lines on the clipboard, such as:
Joe Bloggs
user.name@isp.com
This is some descriptive text
I want to convert it to:
<strong>Joe Bloggs</strong>
<a href="mailto:user.name@isp.com">user.name@isp.com</a>
<em>This is some descriptive text</em>
As you see in line 2, I've used the contents of that line twice, hence the reason I thought saving each line to a variable would be helpful to me.
I wrote a script to do the above in AutoHotKey, but I do so much text processing in MEX that I thought it would make sense to use MEX for this too.
Thanks again,
P