Let's say that I want to write a website that could dynamically create tests on a diversity of subjects. The summery of these subjects are saved in a database, and the important parts of the text are between two tags, which I eventually want to check. I want to accomplish it by putting tags between certain words or sentences of a paragraph like this:
Summary in database:
Aristotle lived from [BEGIN] 384 to 322 [/END] was a Greek philosopher and scientist born in the Macedonian city of Stagira, Chalkidice, on the northern periphery of [BEGIN]Classical Greece[/END].
What I want is to read and retrieve the text between the two tags using Javascript which could be in any format, in this example I used [begin] and [/end] but any format will do, like:
[begin] text [end]### text ###( text )
Is there any way to accomplish this by using Javascript or potentially JQuery?
<span>384 to 322</span>(He was born after he died, if you don't add BC).