Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Trimming text from a tag (Read 1179 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Trimming text from a tag

Tying to trim the text within the parenthesis (xxxxxxxx)

or.......move it to the second line.

I've tried following the text formatting examples on the wiki, but I'm missing
something.




Trimming text from a tag

Reply #1
I use this one, it accounts for the rare cases were %field% starts with a '(':

$ifgreater($strchr(%field%,'('),0,$left(%field%,$sub($strchr(%field%,'('),2)),%field%)

The simpler version is:

$left(%field%,$sub($strchr(%field%,'('),2))

By the way, it appears that you are using $strchr(%field%,')'), thus the undesired result.

Trimming text from a tag

Reply #2
sorry, probably need some further explaining.

the text in question is formatted as such

$tab()%title%$tab()$char(10)

the parenthesis test is part of the title.

I'm using the item detail window

 

Trimming text from a tag

Reply #3
Try

$tab()$left(%title%,$sub($strchr(%title%,'('),2))$tab()$char(10)