I have a short html file loaded as a string in Nodejs.
<html>
<head>
<title>NodeJS</title>
<link href="/style/application.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/scripts/script.js"></script>
<link rel="shortcut icon" href="/favicon.ico">
</head>
<body>
<center>
<h1><a href="#"><% title %></a></h1><br>
</center>
</body>
</html>
I need to get an array of every string between <% and %>. In this case only title.
Tried some javascript string functions and regex but can't find anything...
Maybe finding all positions of <% %> and programatically slice the strings?