2

Can someone please point me in the right direction. I have a simple vb.net application that converts PDF to txt and reads line by line to create a csv file. The original Pdf has changed and I need to modify my code. For example from the line below how could I extract or split each category? For example just the xxxxxxxx for tech ID, DOE JOHN and xxxxxxxx from account number?

line =  "Tech ID: xxxxxxxxxx Name: DOE, JOHN Account #: xxxxxxxx"
0

1 Answer 1

3

You could use the Split method:

Dim line As String = "Tech ID: xxxxxxxxxx Name: DOE, JOHN Account #: xxxxxxxx"
Dim separators() As String = {"Tech ID:", "Name:", "Account #:"}
Dim result() As String
result = line.Split(separators, StringSplitOptions.RemoveEmptyEntries)
Sign up to request clarification or add additional context in comments.

1 Comment

@fpena06: You should accept the answer, then - click the green checkbox to its left.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.