You are here

I can't remove \n from title

7 posts / 0 new
Last post
sbonkov
Offline
Donator
Joined: 1 year
Last seen: 1 month
I can't remove \n from title

Hello, I'm trying to remove the \n (new line) from some titles but I can not.

Can you suggest any option?

Attachments: 
Blackbear199
Offline
WG++ Team memberDonator
Joined: 3 years
Last seen: 6 hours

u need to escape the \ using remove or remove with regex.

also lookup the cleanup command in the manual,it can also do this,it also performs alot of other stuff.

i prefer to be specific on what i perform so if i wanted to remove just the \n

index_title.modify {remove|\\n}

or

index_title.modify {remove(type=regex)|\\n}

the regex way is also good for example if you wanted to remove \n(newline)and/or \r(carriage return) and/or \t(tab).one or any combination can be done in a single line..

index_title.modify {remove(type=regex)|\\[nrt]}

also,this is incorrect..

index_end.scrub {regex||"terminDo":"(.*?)"||}

there is no index_end element,its index_stop

index_stop.scrub {regex||"terminDo":"(.*?)"||}

 

sbonkov
Offline
Donator
Joined: 1 year
Last seen: 1 month

Thanks. I'll try later. Currently, the site does not work .

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

503 Service Unavailable

sbonkov
Offline
Donator
Joined: 1 year
Last seen: 1 month

I tried both options, but it does not work. There is no difference.
In fact, the site does not have a \n , the code is generated by the webgrab i think.

Blackbear199
Offline
WG++ Team memberDonator
Joined: 3 years
Last seen: 6 hours

nope,and it works fine for me..

[  Debug ]      Element value before operation:
[  Debug ] LIGA ŠAMPIONA: \nMagazin
[  Debug ]      String composer result for Expression-1 :
[  Debug ]      Expression-1 expanded   : \

[  Debug ]      Element value after operation:
[  Debug ] LIGA ŠAMPIONA: Magazin

 

Blackbear199
Offline
WG++ Team memberDonator
Joined: 3 years
Last seen: 6 hours

looking at ur ini file again..

index_title.modify {cleanup}

add debug to this..

index_title.modify {cleanup(debug)}

see what the before and after show(look in your log file)..

remember what i said above,cleanup does multiple things and can have unwanted effects sometimes.

 

sbonkov
Offline
Donator
Joined: 1 year
Last seen: 1 month

Ok, i tried again with index_title.modify {remove|\\n}  and it works. I do not know why it did not happen before.

Thanks anyway.

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl