php - Regex matching any successive lines starting with dash -
i have following string:
- give on result - second new text - third text paragraph without list. -new list here i need regex matches successive lines starts dash - so, should returns 2 matches, i.e first 3 lines , last line. have tried /(-(.*)\n\s*\n)*/gum matches last line of the first 3 lines the third text , this demo
Comments
Post a Comment