format problem

AgenturZenit

Client
Регистрация
04.06.2012
Сообщения
30
Благодарностей
0
Баллы
6
hi

when i scrape content from a website and put it to a .txt file the format is bad

example:

andrea;
;phone

; tall
; color of eyes

i need it in this format

andrea;phone;tall;color of eyes


all in one line
i have test it with dom, source,text
alltime the same problem
 

Radzhab

Client
Регистрация
23.05.2014
Сообщения
1 500
Благодарностей
1 264
Баллы
113
C#:
string text = System.IO.File.ReadAllText("1.txt");
var content = Regex.Replace(text, "\r\n", "").Replace(";;","");
 
  • Спасибо
Реакции: AgenturZenit

AgenturZenit

Client
Регистрация
04.06.2012
Сообщения
30
Благодарностей
0
Баллы
6
thank you i will test it
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
if youi scrape data one be one you can use word processing - trim to each variable.
 
  • Спасибо
Реакции: AgenturZenit

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