Regex: pattern repeated capture – delimit the matching at the end of the pattern - non capture group and lookaheads negative exemple -
i wish match end of text , have match characters , line breaks.
but must exclude beginning of next capture!
what want delimit end of pattern next pattern begins.
i tried replace
[^-]
by like
(?!-{2}\\*{3})
it doesn't work !
so want capture number , want capture whole paragraph (some text) between (--*** x ***)
thanks
using regex seems work:
--\*{3}([\d]*)\*{3}(((?!-).*\n)*)
1st capturing group: digit inside stars.
2nd capturing group: text between "headers"
3rd capturing group: last line of paragraph.
a link regex tested: https://regex101.com/r/xj0gc6/1
Comments
Post a Comment