Trim Data That's In Between URL

Hi, I’m trying to get data that’s in between an image URL link;

view

i.e I want to get “Waiter-1” which is dynamic & remove the content beginning from “<ul” all the way to “/>”
The rest of the data after “Waiter-1” is redundant as well

Any pointers?

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @KevinK, you can use the HTML node to extract information from an HTML document which you seem to have.

Unfortunately you have removed a lot of data from your screenshot, but if strings like Waiter-1, 30 mins ago... are is the only actual text inside your li elements, you can use something like this:

This example also trims the part after Waiter-1 using the JavaScript split() method, leaving you with just Waiter-1:

image

Hope this helps!

1 Like

That did the trick! Thanks

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.