I am working on js filter for string text and I want to use regex to capture entire list of list items, so I can count them and iterate throught them.
Please see what I am trying to achieve: https://regex101.com/r/Jd3JYW/2/
I know how to capture lines separately using this regex (^\*[^\*](.*)$)/gm but I need to capture entire list so I can differentiate between two lists, so I can make each of them start from n.1.
I expected the following code to work ((^\*[^\*](.*)$)+)/gm I thought that this wil capture first item (as it works for separate lines) and also any following untill patern is broken. However it is not working, I am still getting separate lines captured. Do you have any idea guys, how to capture whole list? Thank you.