<script type="text/javascript" charset="utf-8">
function get_UA() {
txt = document.getElementById('scripttag').value;
var matches = txt.match(/(UA-[\d-]+)/);
if (matches[1]) {
alert(matches[1]);
}
}
</script>
<textarea name="script" cols="40" id="scripttag" rows="10"></textarea>
<button onclick="javascript:get_UA();">get account id</button>[/code]