I am wanting to use "keywords" within a large string. These keywords start and end using my_keyword and are user defined. How, within a large string, can I search and find what is between the two * characters and return each instance?
The reason it might change it, that parts of the keywords can be user defined, such as page_date_Y which might show the year in which the page was created.
So, again, I just need to do a search and return what is between those * characters. Is this possible, or is there a better way of doing this if I don't know the "keyword" length or what i might be?
Explode on "*"
output
Here ya go:
Use the function like this:
Output:
If you want to extract a string that's enclosed by two different strings (Like something in parentheses, brackets, html tags, etc.), here's a post more specific to that:
Grabbing a String Between Different Strings