Query to extract ID from a string

Like this click on global id after clicking any dynamic button and share us the result