nesdroc Posted July 15, 2022 Share Posted July 15, 2022 Hi, I'm trying to make simple workflow that will use universal actions on an URL to do a "site:URL" search in a search engine. I saw there already is an universal action "Use Domain from URL...", but don't know how to invoke that when making the workflow so Instead I'm looking at Replace action using a regex expression (/^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n?]+)/img). Problem is it's not doing anything on the query even though I tested it. If I input "https://www.alfredapp.com/help/workflows/utilities/replace/" I get the same out. See screenshot. Link to comment
vitor Posted July 15, 2022 Share Posted July 15, 2022 34 minutes ago, nesdroc said: I saw there already is an universal action "Use Domain from URL...", but don't know how to invoke that when making the workflow I don’t understand the question. 35 minutes ago, nesdroc said: Problem is it's not doing anything on the query even though I tested it. The regex goes in the first field, not the second. That’s for what it will be replaced with. This looks like an XY Problem. Please explain what is the goal of the Workflow (not just one step) so we can best help you. Link to comment
nesdroc Posted July 16, 2022 Author Share Posted July 16, 2022 Goal: I want to pass an url in and get only the domain out. E.g. by selecting https://www.alfredapp.com/help/workflows/utilities/replace/ and running the workflow I would expect to get https://www.alfredforum.com as the result (which I then intend to do a search with). However, it's the same thing coming out. Right now I'm just trying to get the first part to work - the regex part. However, if you know how I can make use of this "Use Domain from URL..." within a workflow then of course that would be easier. Link to comment
vitor Posted July 16, 2022 Share Posted July 16, 2022 Great, that is clear. Thank you. Use an Automation Task. URL Processing → Get URL Hostname. Link to comment
Recommended Posts
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