Showing results for 
Search instead for 
Did you mean: 

Leading Zeros in EFM Add-On for .bfp

Former Member
0 Kudos

Hi Everyone,

I'm using the EFM Add-on to format a .bfp file for the MT940 bank statement file format.

I have a problem though with the cheque numbers from the bank statement as it contains leading zeros.

Example: The bank statement file has the cheque number 000000054013 but I want to get only 54013 so that the bank statement processing can recognize them.

This is the regular expression that I have now.

As you can see on the screenshot below the system captures the leading zeroes.


Accepted Solutions (1)

Accepted Solutions (1)

Active Contributor
0 Kudos

Try using a strreplace function (should be in the help files) such as:

str = str.replaceFirst("^0+", "");

^ - match the beginning of a line
0+ - match the zero digit character one or more times

This should go in your mapping section

Former Member
0 Kudos

thank you for the reply Julie but I'm not sure if I understand it correctly.

I got an error. I'm not of a technical background. I'm a finance guy by training.

Former Member
0 Kudos

thank you for hint. I got it working now.

Answers (0)