Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing fixed width string with variable segments #34

Open
jaysara opened this issue May 16, 2024 · 0 comments
Open

Parsing fixed width string with variable segments #34

jaysara opened this issue May 16, 2024 · 0 comments

Comments

@jaysara
Copy link

jaysara commented May 16, 2024

I have a variable segments structure like,

A001{field1-2character}{field2-12characters}{field3-21characters}C001{field4-1character}{field5-10characters}{field6-13characters}D001{field7-12character}{field8-2characters}{field9-21characters}

another string can be

A001{field1-2character}{field2-12characters}{field3-21characters}B001{field11-5characters}{field12-8characters}{field13-3characters}D001{field7-12character}{field8-2characters}{field9-21characters}E001{field20-5characters}{field21-12characters}{field22-2characters}

As mentioned we have segments like A001, B001 , C001, D001, etc.. All segments have fixed format fields. However some segments may or may not be present in a given string. The parser needs to figure out whether a segment is there or not and execute parser logic specific to the segment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant