Hi i'm new to programming and it's my first question, so please go easy on me.
I want to create a function that extracts text which is between BEGIN and >. For example with a string of text:
str="Random stuff here TEXT BEGIN extract this text > here is other stuff >"
The function should extract the text between BEGIN and >. The text in-between, can be anything from symbols like \n or be another string.
I know I can get every instance of BEGIN with position,
Position[StringSplit[str],"BEGIN"]
but how do I get the position of the next instance of > from BEGIN, so I can extract the text in-between? Or is there a smarter way of doing this?