on 12-04-2008 6:39 AM
Hi Experts,
My requirment is to read the EDI file through java ..... I am facing problem because in the EDI file the line is seperated by symbol 'square' .I cant read this symbol .... even i tried to copy the symbol but it is copied as blank space.....
how to handle it through java...
Regards,
RajeshKumar.D
Hi,
The "square" symbol that you are referring to is probably a CRLF (Carriage Return - Life Feed) Control Character.
This is more commonly known as a "Enter" at the end of a line / sentence.
To clean this character from strings in Java, please use:
String patternStr = "(?m)$^|[\\r\\n]+\\z";
String replaceStr = " ";
Pattern pattern = Pattern.compile(patternStr);
Matcher matcher = pattern.matcher(inputStr);
return matcher.replaceAll(replaceStr);
Hope that helps.
Thanks.
p256960.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check the content type, it may help you to get some hints
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.