Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • 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.

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 by comment

  • 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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.