0 votes

Allow the Format tag to trim characters from the beginning and end of a string

original thread on the forum:
discourse.tangible.one/t/removing-the-https-from-a-url-field/955

Description:
“In php (ACF) I do this:

$website = get_field(‘website’);
$website_nice = parse_url( $website, PHP_URL_HOST );

Wondering if there’s something that will do the same thing in L&L?

I have tried the Format tag which works great but it still retains the trailing / which the php code removes.

This could be one user’s use case related to URLs.
This trimming function should have the ability to trim characters from the beginning or end of a string, either by specifying the number of characters to be trimmed or by selecting a particular character or set of characters to trim (either including or excluding them from the trimmed result). This allows the user to choose how they want the characters to be trimmed from their string.

Perhaps we could improve the format field or we could follow up a bit on this other thread and use the regex option somehow:
feedback.tangibleplugins.com/b/loops-logic/content-split-with-search-replace

Live 6decb5f4a1e278db1656edc6fcc177dd?s=40&d=mm&r=g TeamTangible shared this idea

Leave a Reply

Your email address will not be published. Required fields are marked *