Yes this is possible. You'll need to understand calculations for pull out the domain name, the limits of your data (will you get http:// sometimes? what about bad URLs like www.domain? etc), as well as scripting to create a related record in the new table, plus field validation to prevent duplicates.
What real world problem are your trying to solve?
And one simple way to avoid duplicate would be to define a text field, (can be a global) for the parsed domain name and use it as a match field with the "create" option to your table of domains.
Once you've parsed the domain from the larger URL, you set the global field to this value and then use set field to set some date to a field in the domain table. The relationship's create option will create a new record, but only when there is no matching record already present in the table and thus you get one record for each unique domain.
I have a table which I load a csv file of tails too. The csv file will include multiple tails that all have the same domain name. The csv file is saved in the tails table.
and so on for the csv file upload to the tails table.
I want to keep the original data in the tails table.
Once the data is uploaded to the tails table I want a script to go through the new upload and identify unique domain names. From the above example it would id http://www.domain1.com and http://www.domain2.com
The second table is the domain table. The domain table carries 1 unique record of each domain.
The script would look to the domains upload from the csv file and identify 2 unique domains added to the tails table. domain1.com and domain2.com
It strips away the http:// and the tail leaving only the domain name: www.domain1.com
It now looks to the second table; the domain table and identifies if any of the 2 new domains just uploaded are already present in the domain table. If a domain is already present it does not make an entry. If the domain is not present then it adds to the domain table.
The final outcome is that now I have a domain in the domain table eg:
www.domain1.com and in the tails table still the original data.
I'm hoping that describes the real world example.
Thanks for taking the time to assist me.