Using jQuery, I have a situation where I need to remove all trailing whitespaces within a textarea field on a per line basis.
For example, I have the following case:
<textarea name="f01" rows="30" cols="90" wrap="VIRTUAL" id="40459045A">
CC9G-ws-001
9G-ws-001
G-AAG-001
REE65M
NONE4007M
GE4M
GLBNE2101
7SK-E-902
EM-E-902
</textarea>
I am referencing the textarea in jQuery using $("textarea[name=f01]")
but I am not sure how to remove the trailing spaces for each line.
If you highlight one of the rows within the above textarea tags, you will see the trailing spaces. I would like all of those removed.
Additionally, I would like the actual result of all the trailing spaces removed for each of the textarea lines returned to one value result, as I need to then use this result for some other processing.