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

Can you elaborate on what your expectations are? Please give an example of input and output.

The one thing that does jump out is that 85+ means an 8 followed by one or more 5's. Is that what you intended or do you mean a literal plus sign? (Which would need a backslash escape: 85\+).

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.