I've got a file which looks similar to this (but with many many more lines):
AZ-95-TEST________
BP95_1234_EX______
1_2_3_____________
The software that outputs this list, pads out the end of the character strings with underscores (_) up to a certain length. I need to strip out the underscores that are added purely at the end of the lines, keeping any underscores that are within the character string, so that I'd be left with:
AZ-95-TEST
BP95_1234_EX
1_2_3
I can't get the regular expression right to do this.....
Cheers guys.
AZ-95-TEST________
BP95_1234_EX______
1_2_3_____________
The software that outputs this list, pads out the end of the character strings with underscores (_) up to a certain length. I need to strip out the underscores that are added purely at the end of the lines, keeping any underscores that are within the character string, so that I'd be left with:
AZ-95-TEST
BP95_1234_EX
1_2_3
I can't get the regular expression right to do this.....
Cheers guys.