Split / Parcel Data from webbook

Split / Parcel Data from webbook

I have data: url = https://www.domain.com

and the data I want is simply: domain.com

I have been trying to do with the HTML Extract & the Function node.
any insight would be greatly appreciated.

Been trying to get this done for over an hour and I feel like it should be pretty simple :slight_smile:

Hi @David_Go, this should indeed be simple. You could use an expression that replaces the https://www. with an empty string like this:

image

Example Workflow

This example workflow uses the replace() method through an expression. You could append more .replace() as needed or try regular expressions to cover more cases (like http://www. or any other prefix you might encoutner).

1 Like

AMAZING - You just make my n8n install so much more powerful with this :slight_smile:

1 Like

Awesome, I am happy to hear this was helpful! You might also want to leave your vote on this feature request from @RedPacketSec to save users from having to write JavaScript for such manipulations:

1 Like

Done made my vote :slight_smile:

1 Like