Text processing issue

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
In latest build, I'm experiencing issues with action: text processing.

Due to pulling data from a csv file (related to this issue), the prices come with random characters which I clean via text processing:



When doing it via text processing, it has a habit of missing some of the price data. like:



But if I don't use this action, ZP grabs all the prices ok, like:

 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43
Would help if you posted some lines from your csv file.
And your regex looks kinds of off. Do you know what it matches?

\d.\.\d.
Will match one digit.

\d.\.\d.
Will match one (any) character.

\d.\.\d.
Will match one dot.

\d.\.\d.
Will match one digit.

\d.\.\d.
Will match one (any) character.

So all lines formatted like DIGIT - ANYCHARACTER - DOT - DIGIT - ANYCHARACTER will be matches.

Examples:
12.34
23.45
1x.1x
0b.8c



While those will not be found, because it doesn't match your pattern of 5 characters (2 digits, 1 dot and 2 of anything).
1.23
5.23
6.22
7.7
5.0
5



http://zennolab.com/discussion/threads/strange-regex.24262/#post-167337

Bookmark this http://tobbe.co/regex
 
Последнее редактирование:

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
Not sure reg is the culprit, as it grabs all the other prices (all are four digits with a decimal point).

Anyway, it works when I bypass this action. I think TP is buggered.
 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43
Not sure reg is the culprit, as it grabs all the other prices (all are four digits with a decimal point).
Anyway, it works when I bypass this action. I think TP is buggered.
But in your pictures above not all prices are 4 digits with a decimal.
I'd advise you to track down which is failing and inspect them closer.
 

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