Reputation: 5
I am relatively new to RegEx and need help splitting up a section of text by two delimiters, and then capturing what's between them. For instance, I have a JSON object that has a "description" property, and it essentially contains this text:
This is yet another test product to test for all sorts of styling/formatting issues.
PLACEHOLDER
PLACEHOLDER
PLACEHOLDER
******
Not so expensive
Works all day
Works throughout the night
No risk
100% Guarantee
------
This would be where ingredients would go for Test Product 4.
What I am trying to do is to capture the "bulleted" list between the six-asterisk delimiter and the 6-dash delimiter. So in the above example, I want to be able to capture these lines:
Not so expensive
Works all day
Works throughout the night
No risk
100% Guarantee
Thus, I need to split by two delimiters:
1) ******
2) ------
After searching around this and other forums, I still can't seem to get any form of .split() method and RegEx to get precisely what I want. Is anyone able to help me out here? The ultimate goal is to be able to capture that text and then append it to a <div>
Upvotes: 0
Views: 392