Hello.
in the process of processing data, I want to delete only the unnecessary parts of the repeated rules, is there a way?
With similar activities
The way someone taught me is to extract only the middle except for the top and bottom.
str.Split({“a”,“b”},StringSplitOptions.None).Where(function(x,i) not (i mod 2) = 0).ToArray
When I did it in the above way, I didn’t get the data I wanted, so I want to know how to extract it in a similar way as above.
The data I want to delete is the yellow marked part below.
Can you share your input text and expected result?
And also your purpose?
It might be better to extract necessary part than to delete unnecessary part.
The part that I want to get rid is
INCOTERMS FOB FREIGHT COLLECT CONTAINER FCL 20DRx1
This is a recurring rule
In here, The part I want to remove is
FRIGHT ~ FCL XXXX
XXXX is where it keeps changing.
The other place I want to get rid of is
SUB TOTAL ~ XXX
Here X is a number that changes the end, so how can I use the method I taught you?