You are here:  » trim after

Support Forum



trim after

Submitted by mally on Fri, 2011-11-25 14:20 in

Hello David,

I'm wondering if you've got any code that would add a filter called "trime after"

At the moment I've got a field that I would like to remove everything after a certain word, code that be an option please?

Thanks Mally

Submitted by support on Fri, 2011-11-25 14:33

Hi Mally,

Easiest method is probably to use an Explode filter with the keyword / code you wish to trim after as the Explode Character or String, and a return index of 0.

That will also strip the keyword or code, so follow that with a Text After filter to replace the keyword / code for the end result you're looking for - don't forget a SPACE before the keyword / code in the Text After filter!)

(the Explode filter has been in the distribution for some time now but if you don't already have it the code is in this comment)

Cheers,
David.
--
PriceTapestry.com

Submitted by mally on Fri, 2011-11-25 22:06

excellent works perfectly thanks