Issue with text processing > replace via regex

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
In latest v. 5.9.5.1

Just stumbled on an issue with text processing feature.

I use regex to replace spaces with: +, i.e. how to fish, ends up as: how+to+fish. (This is used as a search string in a url).

It works fine in PM, but in ZP it screws everything up. Example:


Via PM:

knitting+stitches+designs
how+to+play+electric+guitar+for+beginners+step+by+step
xbox+one+vs+ps4+graphics


Via ZP:

+k+n+i+t+t+i+n+g+ +m+a+c+h+i+n+e+ +h+a+t+
+c+o+o+k+ +c+h+i+c+k+e+n+ +i+n+ +p+r+e+s+s+u+r+e+ +c+o+o+k+e+r+
+p+i+g+ +f+a+r+m+i+n+g+ +i+n+ +i+n+d+i+a+ +i+n+ +h+i+n+d+i+

Here is how I've set it up:



Note: what to seach field is just a space.
 

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
Update: user error! (facepalm)

Seems to work using regex: \s
 
Последнее редактирование:

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 771
Благодарностей
1 184
Баллы
113
There is user-error yes but also it should work in same way in PM and in Zennoposter. So I changing back to non solved for Anton to look on this.

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

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
Correct regexp is \
There's space after \

I will test task.
 

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