Scrape Analytics ID


I would like to display the Analytics ID from a page ( The regex looks like this: 'UA[^']++'.

Unfortunately I can't get the Excel formula right. The result should be UA-51025928-1.


Have you tried this one?


Since I need the same function for the Google Tag manager, I need a different solution.

Regex: 'GTM;[^']++'.

Example Google Tag Manger page:

here GTM-KGG74VH should be displayed.


This one works for me:

Assuming the code only have letters and numbers. and exists in the id attribute.


Thank you!