Getting string between two strings in java
I am creating a web server, and since I can't use typical backend languages, I created my own. With JUST this code, I can compile it, but since the code is embedded into the HTML file, I need to isolate it. A simple code block would look like
<j%:
db store "ethan" as $_GET:demo
print $_GET:demo
:j%>
and I know how to parse the data inside of the beginning ( <j%: ) and end ( :j%> ) elements, since that engine works, I just need to know how to isolate the code inside of that block if it were in a file like this
<j%:
db store "ethan" as $_GET:demo
print $_GET:demo
:j%>
<b>OMG BOI</b>
<p>Output: <j$_GET:demo/j> </p>
<p>Again: <j$_GET:demo/j> </p>
<hr>
<h1>GET Form</h1>
<form method="GET" action="index.html">
<input type="text" name="demo">
<input type="submit">
</form>
<hr>
<h1>POST Form</h1>
<form method="POST" action="index.html">
<input type="text" name="demo">
<input type="submit">
</form>