String and array help

I have an array. I want to remove the first few words and then split the array by space so I can add it to an excel sheet or a datatable.
The array is read from a PDF.
This the array:
“U T GENERAL ACCT 123456789 Monthly, Billed 0.00000* 0.00000* $12,729,861.00 $11,494,538.00 $11,498,538.00 $0.00”

What I want:
“123456789
Monthly, Billed
0.00000*
0.00000*
$12,729,861.00
$11,494,538.00
$11,498,538.00
$0.00”
I want to separate those then add to an excel sheet.
Right now, I am taking the array, using regex to get the first words only, replacing them with a space.
I am not sure how to put that back in the array, so I can trim and then split by space? Any ideas?

Thanks so much! Here is part of my workflow

1 Like

@mlmyers Will “U T GENERALACCT” be present Always when you want to Extract this kind of Data or does it differ?

@supermanPunch the wording will differ.

Hi

i didnt get this buddy
is the string arranged in a structured way
can i have few more examples if possible
Cheers @mlmyers

1 Like

Attached workflow. I attached one previously but I think it didn’t fit your needs.

With this workflow you will find the position of a giving string in an array and you will give the method skip this position. It will skip every word until it finds a given word.test.xaml (6.7 KB)

You can also just just pass an integer to the method if you know the number of words that you want to delete.

You have to have a defined set of steps if you want to do normal programming. Either know: how many words you want to delete or on which key word you want to stop and cut . Other wise you will need to do a machine learning workflow.

@Palaniyappan

Here is the array of strings, It came from a PDF, I split the string to get the table. For each item in the string, I need to remove the first set of words, place the rest in a way that I can put it in a datatable, each in its own column (monthly, billed should be in the same column)

string[4] { “UNIVERSITY OF TENNESSEE 987654321 Monthly, Billed 0.00000* 8.50000* $5,297.00 ($483.00) $5.00 $489.00”,

“UNIV OF TENN FOUNDATION 100000001 Monthly, Direct Debit 0.00000* 8.50000* $331,336.00 $0.00 $0.00 $0.00”,

“U T GENERAL ACCT 123456789 Monthly, Billed 0.00000* 0.00000* $12,729,861.00 $11,494,538.00 $11,498,538.00 $0.00”,

“UT RESEARCH FOUNDATION 101010101 Monthly, Direct Debit 0.21000* 8.00000* $5,166,796.00 $5,164,388.00 $5,164,388.00 $0.00” }

thanks,

thanks @Juan_Arriaga
I am about to check it out and I will let you know my results.

did you found the workflow useful?

I apologize. I have been under the weather. I tried it today and it almost works. Please see below for the input and the output.
Input String:
UT RESEARCH FOUNDATION 1234567 Monthly, Direct Debit 0.21000* 8.00000* $5,166,796.00 $5,164,388.00 $5,164,388.00 $0.00
Output:
UT
RESEARCH
FOUNDATION
1234567
Monthly,
Direct
Debit
0.21000*
8.00000*
$5,166,796.00
$5,164,388.00
$5,164,388.00
$0.00

I will need Monthly, Direct Debit together, so I can put in the same cell…

also, the variable intPos cannot have a default value, because I am not sure what the value would be after the words.

sorry, I’ve been kind of busy with work but if you check your data you will see that monthly is the word that defines where to split the string. You just have to add a position to left on the array that has already been created in the previous workflow. What you can do then is use a regular expression since this words will not contain a number but the rest will. So you can add every word without a number to the same cell and the rest leave like the workflow shows you.
Regards