Grouping text in Visual Studio VB

Viewed 51

I'm writing here because I'm new to programing and I have a problem I don't know how to solve. I'm creating an application in Visual Studio (VB). I'm trying to group the text into two groups "CTRIA3" and "CQUAD4" as seen in an example below (the real file is going to have over a million lines).

FROM:

" CQUAD4 1 1 757 758 1009 1008

CQUAD4 2 1 758 759 1010 1009

CTRIA3 3 1 757 1008 1007

CQUAD4 4 1 759 760 1012 1011

CQUAD4 5 1 760 761 1013 1012

CTRIA3 6 1 759 1011 1010

CQUAD4 7 1 761 762 1015 1014

CQUAD4 8 1 762 763 1016 1015

CTRIA3 9 1 761 1014 1013 "

TO:

" Type: CTRIA3

3 1 757 1008 1007

6 1 759 1011 1010

9 1 761 1014 1013

Type: CQUAD4

1 1 757 758 1009 1008

2 1 758 759 1010 1009

4 1 759 760 1012 1011

5 1 760 761 1013 1012

7 1 761 762 1015 1014

8 1 762 763 1016 1015 "

0 Answers
Related