It is very easy to set up a simple expression that will "capture" the contents of FieldInternalName:
<!--.*?\bFieldInternalName="([^"]+)".*?-->
Demo
This expression works by looking for:
<!--
- 0+ characters (
.*?)
FieldInternalName=" (preceded by a word boundary,\b, so that you don't match something like FakeFieldInternalName=")
- 1+ non-
" characters ([^"]+)
"
- 0+ characters (
.*?)
-->
Using RegExp.prototype.exec(), we can extract the contents of this match:
var idRegex = /<!--.*?\bFieldInternalName="([^"]+)".*?-->/,
idString = '<!-- FieldName="App" FieldInternalName="Application" FieldType="SPFieldLookup" -->';
var matches = idRegex.exec(idString);
console.log(matches[1]);
<script src="https://getfirebug.com/firebug-lite-debug.js"></script>