TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Karen Wilson
NA
6
2.1k
Parse an EDIFACT message to find a certain segment
Nov 13 2019 1:53 PM
Hello, I am trying to parse out the all the LOC segments and populate an array with the 2nd and 3rd element of each segment.
Note: the ‘+’ is an element delimiter
I understand to parse a string into an array I can use something like this:
string[] Arr = str.Split(new char[] { '[', ']' }, StringSplitOptions.RemoveEmptyEntries);
But when trying to parse a message, how do I only find a certain segment?
UNA:+.? '
UNB+UNOC:3+2021000969+4441963198+180525:1225+3VAL2MJV6EH9IX+KMSV7HMD+CUSDECU-IE++1++1'
UNH+EDIFACT+CUSDEC:D:96B:UN:145050'
BGM+ZEM:::EX+09SEE7JPUV5HC06IC6+Z'
LOC+17+IT044100'
LOC+18+SOL'
LOC+35+SE'
LOC+36+TZ'
LOC+116+SE003033'
DTM+9:20090527:102'
DTM+268:20090626:102'
DTM+182:20090527:102'
Reply
Answers (
1
)
how to resize the image in JS
Retrieve Previous Years Data From SQL Server