Take a part of a line

  • Автор темы Автор темы kendy
  • Дата начала Дата начала

kendy

Новичок
Регистрация
06.05.2011
Сообщения
18
Реакции
0
Баллы
0
Hi friends ;) i have a text file with hundred and hundreds lines, and i would like to take only the first 10 words of these lines. I know how to take the full line, but i don't know how to take only the first 10 words. Do you know how i can do it ? Thanks you very much for your help ^_^
 
put the separator after every 10 words like |
than you can handle it by using String.Split
 
  • Оценить
Реакции: kendy
regex the string ----> word/numeric \ whitespace X 10 words. <-- rudimentary version :cool:


Someone will know the exact regex....
 
  • Оценить
Реакции: kendy
Thanks for your replies men ;)

I will wash my brains and try the gcomm answer
 
Here's a JS solution for you. Took me a little while but it gives you what you want without having to put anything in your file.

Посмотреть вложение Get10Words.xml

You'll have to replace the name of your file in the first step branch macro.
 
  • Оценить
Реакции: kendy

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