Rich S Posted November 3, 2011 Posted November 3, 2011 Greets, all: This is what I get for switching to decaffeinated coffee: I can't figure out how to modify this calc so it truncates the prefix to a URL: Let( [ adj = Substitute( Url__lxt; "//"; "§" ); pos = Position( adj; "/"; 1; 1 ); top = Case( pos; Left( adj; pos - 1 ); adj ) ]; Substitute( top; "§"; "//" ) ) As is, the calc does a nice job of truncating a URL's path so: http://www.career-launcher.com/help/how_to_find ...becomes... http://www.career-launcher.com However, I want to truncate the URL even further by removing everything to the left of the URL so it reads: career-launcher.com TIA for your help! Rich
comment Posted November 3, 2011 Posted November 3, 2011 Try = Let ( [ adj = Substitute ( "§" & URL ; [ "§http://www." ; "" ] ; [ "§http://" ; "" ] ; [ "§www." ; "" ] ) ; pos = Position ( adj ; "/" ; 1 ; 1 ) ] ; Case ( pos ; Left ( adj ; pos - 1 ) ; adj ) )
Recommended Posts
This topic is 4827 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now