April 14, 20241 yr Newbies Looking for script to parse Domain Name (content between "//" and "/" of full URL). Ideal would be to add script to existing script (pastes full URL). Parsed content to be pasted info field "Domain." I'm a new member. Already searched the forum for "domain parser" and came up empty (surprisingly). Resources found through Yahoo search didn't work. Thanks in advance.
April 14, 20241 yr 4 hours ago, Steven Thompson said: Looking for script to parse Domain Name (content between "//" and "/" of full URL). This would be a job for a calculation, not a script. You can use such calculation in a script, for example to do: Set Field [ YourTable::Domain ; «the calculation» ] Now, the calculation itself could be simply: Let ( [ start = Position ( URL ; "/" ; 1 ; 2 ) ; end = Position ( URL ; "/" ; 1 ; 3 ) ] ; Middle ( URL ; start + 1 ; end - start - 1 ) ) or even: GetValue ( Substitute ( URL ; "/" ; ¶ ) ; 3 ) -- P.S. Strictly speaking, the substring between "//" and the next "/" is called the authority, and it includes the domain and optionally the port - see: https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL Edited April 14, 20241 yr by comment
April 14, 20241 yr Author Newbies Ah, being a calc vs script would explain my frustration! Thanks also for the technical definitions about URLs.
Create an account or sign in to comment