Extract specific text extracted using CSS selector from a website

Dear community, I have checked the docs and searched other posts to try to resolve my question, but unfortunately, I had no luck!

My goal is to create a snippet to hyperlink a specific part of text extracted from a specific page, in google Doc. Can you please help me understand, what am I doing wrong?

I created the following snippet:

{key: cmd-k}{key: shift-tab} «{site: text; page=https://test.com/; selector=.private-modal__header}»{key: tab}{site: url; page=https://test.com/}{key: enter}

The problem I encounter is that the text always starts with "Manage access to" I need the text after that.

i.e: I am getting the result as Manage access to purchase order 1

I only want the text that is after Manage access to

My result should be: purchase order 1

@scott @Scott_Fortmann-Roe @Dan_Barak1, I saw you guys answered some posts, so I'm tagging you hoping you could help me.

Thank you in advance for your help!!

Hi @Laura_Gil
Try this:
{=extractregex(text,"Manage access to (.*)")}
Where text is replaced with your selector

@Dan_Barak1,

Thank you very much for your quick reply!

I did what you suggested, but I'm getting an error

image

image

It should be:
{=extractregex({site: text; page=https://test.com/; selector=.private-modal__header},"Manage access to (.*)")}

@Dan_Barak1 You saved my life! Thank you very much!!!