How to select text within an element using Xpath

I am building a webscraper that has the following code:
Ginger Ray - #PAM-502
The XPath I currently have is //span[@class=“supplier-search”]
However, the data of interest is located after the #. Is it possible to specify this in Xpath, so only PAM-502 is output?

Hi Emilio,

I’m not totally sure I understand the ask here. Would you be able to link the website you’re trying to extract from and specify exactly what the data of interest is?

Hi Emilio,

We have office hours with @Rachel_Adler on Connectors in 10 minutes. Join the Zoom link here at 11am EST and we can talk out your question live!


Hi @Emilio_Bronte
If I understood your question correctly, the crawler retrieves the text “Ginger Ray - #PAM-502” but you only want “PAM-502”, and you want to achieve this using only Xpath.
Is the whole text within ?

If you are using Yext’s connector, I would leave it as-is and transform the text within the connector.