Select right most text from a site selection

Hi, I am trying to scrape some information from a website selection. I can either grab it as the last 6 digits from the URL itself, or from the site location in the image below.
Screenshot 2024-02-08 112235

The snippet attached is set to grab from the on screen element, but I would like to trim it to just the ticket number at the end (last 6 digits) due to needing to format it a specific way. How can I get the site selector to work with the text functions, as I would also like to add a selector for subject, but restrict it to the first 10 characters as some tickets have huge titles.

Thanks!

{site: text; page=https://manage.sixstar.support/*; select=ifneeded; selector=.css-lrqpdc} - Update {cursor: trim=left}

Hi @shane.murphy Welcome to the forum! :slight_smile:

Text Blaze commands are usually plug and play based on the correct data type. The {site} command returns text, so you can use any text function on it. Here's an example:

{text=" asdf 1234 "}My text: {=text}
Get the rightmost four digits after trimming whitespace: {=right(trim(text), 4)}
Get the leftmost four digits after trimming whitespace: {=left(trim(text), 4)}

In both the examples above, you can replace text with your site command. Let me know if it works for you.

1 Like

Thanks for the quick reply! so I could do the following?

{=right(trim({site: text; page=https://manage.sixstar.support/*; select=ifneeded; selector=.css-lrqpdc}), 6)}

I think so, yep.

Great thanks! Yep tried that and its spitting back with the right format, loving it!

Forgot that formulas are =formula to get them to work