Copy div contents to variable

I can't test without the actual HTML code, but something like this should work:

image

Javascript:
document.querySelector('div.participant—name').innerText;

Search For:
(.+)\h+.*

Replace with:
\1

If this does not work, please post a large block of the HTML code around the target statement using Forum Code Block, with "html" as the language.