Wanted - paid work for regex issue.

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
I need someone to compile a regex for ZP, and am willing to pay £20 (Paypal gift) to whoever completes it, and provides the correct regex that works with ZP.

Some guy on Fiverr was unable to do it, so looking to the finest in this forum to have a shot. :D

Ok, so if you look on this Amazon marketplace page, the first item displays as: Back-ordered, and the other one is: In Stock. Both have a period (.) at the end, so you can use this in the regex.

If you look at the page source, both items have the following html tags before it:

Код:
<li class="olpFastTrack"><span class="a-list-item">
but, there are a load of spaces, and maybe an enter in there, like this:

Код:
        <li class="olpFastTrack"><span class="a-list-item">
            In stock.
Note: I just need to capture the status of the stock, so don't worry about including 'In stock' into the regex, as sometimes Amazon use various messages (I will perform the checks on the captured results myself). So best to capture up to the first period (.).

Thanks.
 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43
 

Вложения

  • Спасибо
Реакции: CSS и shabbysquire

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
Thanks Tobbe. I'll check it out once I return home. If it does the job, then I'll send you the money (PM me your PP address).
 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43
Nah it's fine, buy yourself a pack of beer :-)
 
  • Спасибо
Реакции: shabbysquire

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
Decent technique, thanks! :az:

So you strip out all the spaces in the page source, then work with the result? Never tried that, but will use this from now on.

Anyway, re the payment let me know if you change your mind.
 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43
Yeah, you remove unnecessary spaces, replacing multiple/new line with just one, etc.
But they can also be good to keep, depending on the project and what you're trying to match.
I see now that the regex could've been improved, but you get the point :-)
 

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