JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
JavaScript
jQuery(document).ready(function() {
var text =`#DATA1 1000
#DATA2 1000
#DATA3 2000
#VER B 2 20190403 "Text" 20190413
{
#TRANS 3001 {1 "TEXT"} -14000 "" "" 0
#TRANS 2611 {1 "TEXT"} -3500 "" "" 0
#TRANS 1510 {1 "LIU"} 17500 "" "" 0
}
#VER C 1 20190426 "TEXT" 20190426
{
#TRANS 1930 {} 1875 "" "" 0
#TRANS 1510 {} -1875 "" "" 0
}`;
var myRegexp = /^#VER(.*\n)+?}/m;
do {
//Each call to exec returns the next regex match as an array
var match = myRegexp.exec(text);
if (match != null)
{
console.log(match);
}
} while (match != null);
});