Thanks a lot. It worked. I have another question. If I have a line of string like this:
----assdfa----fsdfsdfasdfsdfsf------------
How do I remove the dashes at the end? The number of dashes at the end varies with each line. I would like to remove them and replace them with an * and some ? (question marks). I was thinking of some string functins that allow me to count characters from the end, and other functions to subtract or replace them.
Thanks.