Random-Orderly split string......?

dusk

Client
Регистрация
07.06.2011
Сообщения
25
Благодарностей
2
Баллы
0
Hi,

I have a large file with state and zipcode in the form of

1:36925
3:85140
4:71601
etc

How can I take random lines from the file while retaining the state:zip string.

If I use this it just takes the same first line over and over

{-String.Split-|-{-File.GetString-|-\Resources\states_zips.txt-|-0-|-false-}-|-:-|-0-}

{-String.Split-|-{-File.GetString-|-\Resources\states_zips.txt-|-0-|-false-}-|-:-|-1-}

If I use

{-String.Split-|-{-File.GetString-|-\Resources\states_zips.txt-|-random-|-false-}-|-:-|-0-}

{-String.Split-|-{-File.GetString-|-\Resources\states_zips.txt-|-random-|-false-}-|-:-|-1-}

The zip and state don't match.

Don't know if I explained it clearly. I am new to his so I don't know what I am talking about.:huh:
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
Take the line from the file first in a step.
Then do your first split, then the second.

{-File.GetString-|-\Resources\states_zips.txt-|-0-|-false-} Say this result is {●4●8●3●3●3●8●-|-vc-3363}
Then your next step branch would be {-String.Split-|-{●4●8●3●3●3●8●-|-vc-3363}-|-:-|-0-}
The next step would be {-String.Split-|-{●4●8●3●3●3●8●-|-vc-3363}-|-:-|-1-}

Hope this helps
 
  • Спасибо
Реакции: dusk

gcomm

Client
Регистрация
01.03.2011
Сообщения
332
Благодарностей
93
Баллы
28
Ya man, check this thread - it has an xml for the string split as well... seems to be a hot topic -
 
  • Спасибо
Реакции: dusk

dusk

Client
Регистрация
07.06.2011
Сообщения
25
Благодарностей
2
Баллы
0
Ok, Thanks guys.

Seems to be working. (famous last words)
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)