on 12-07-2015 6:47 PM
Hi Experts,
Could you please give the suggestions on below requirement.
From the sender system we are getting the data with multiple spaces in between (Ex: SAP PI Mapping) . And we have to replace that multiple spaces with one space.(Ex: SAP PI Mapping). Even we don't know how many spaces are coming from sender side. Scenario is JDBC to sFTP.
Thank you in Advance.
Regards,
Anusha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anusha
Use this logic.
while(input.contains(" ")){
input = input.replaceAll(" ", " ");
}
input -------> you input field.
input.contains(" ") -----> Use 2 spaces between double quotes.
input.replaceAll(" "," ") ---------> replace 2 spaces with 1 space. First double quotes will have 2 spaces, and second double quotes will have 1 space.
Regards
Osman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.