IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
Trimming text from a tag
smb
post Oct 2 2011, 02:37
Post #1





Group: Members
Posts: 5
Joined: 3-February 06
Member No.: 27507



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.



Go to the top of the page
+Quote Post
for4saken
post Oct 2 2011, 03:23
Post #2





Group: Members
Posts: 6
Joined: 22-March 11
Member No.: 89211



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.
Go to the top of the page
+Quote Post
smb
post Oct 2 2011, 03:33
Post #3





Group: Members
Posts: 5
Joined: 3-February 06
Member No.: 27507



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

This post has been edited by smb: Oct 2 2011, 03:36
Go to the top of the page
+Quote Post
for4saken
post Oct 2 2011, 03:45
Post #4





Group: Members
Posts: 6
Joined: 22-March 11
Member No.: 89211



Try

$tab()$left(%title%,$sub($strchr(%title%,'('),2))$tab()$char(10)
Go to the top of the page
+Quote Post
smb
post Oct 2 2011, 03:50
Post #5





Group: Members
Posts: 5
Joined: 3-February 06
Member No.: 27507



QUOTE (for4saken @ Oct 1 2011, 21:45) *
Try

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



that works...thx
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 31st July 2014 - 18:38