For your second problem it may be that the best approach is to use a white list - a list of characters that are OK. You can use the translate operator tr (see Quote Like Operators - look for tr/ ) to delete all characters from a string that are not in a given list.
In reply to Re: Removing space at end of field and converting to text
by GrandFather
in thread Removing space at end of field and converting to text
by htmanning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |