{clipboard_data={clipboard}}
Extracted URLs from clipboard:
{urls=extractregexall(clipboard_data, "https?://[\\w.-]+/[^\\s]*")}
{=urls}
{if: count(urls) = 0}
{error: No URLs found in the clipboard.}
{endif}
{run: # Define a function to process URLs for a specific domain
processUrls = (urls, domain) -> block
# Filter URLs for the domain
var filtered_urls = filter(urls, url -> startswith(url, domain))
# Cut down to the first 25% of the filtered URLs
var limited_urls = slice(filtered_urls, 1, ceil(count(filtered_urls) * 0.25))
return limited_urls
endblock
# Initialize buffer to store results
buffer = {{^^%5B%5D^^}}
# List of example domains to process
example_domains = ["example1.com", "example2.com"]
# Simulate recursion by iterating over each domain
for domain in example_domains
buffer = merge(buffer, processUrls(urls, domain))
endfor
}
Processed URLs (First 25% for each domain):
{=join(buffer, "\n")}