in reply to Line trimming regex doesn't work as expected

Well, how do you expect it to work? What should it be doing?

No one can help you without those fairly basic questions being answered.

emc

" When in doubt, use brute force." — Ken Thompson