Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3303

Can I use REGEX to remove last character in a file

$
0
0

I have a file on the sap server which looks something like this:

 

0001#Text#gfdkgh#

0002#more#ljjpoir#

0003#then#ljddpoiw#

 

I want a program to remove the last hash character from each line.

 

I can read this file with OPEN DATASET etc, then REVERSE the line, and REPLACE FIRST CHAR with SPACE. This works fine but I wanted to find out if it could be done with REGEX as it might be more economical?

 

All help greatly appreciated. Thank you.

 


Viewing all articles
Browse latest Browse all 3303

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>