Currently, I am working on a JavaScript script and I am in need of a Regex pattern to quickly match "JSDocs". The specific pattern that I am trying to match looks like this:
# this is block1
/// text
/// text
/// text
/// text
# this is block2
/// text
/// text
/// text
/// text
A block in this context is defined by consecutive lines starting with "///". Here is what I have come up with so far:
/(/^(\/{3}[\w\W]*)^(?!\/{3})/gm
The issue I am facing is that my current regex pattern requires two line breaks (\n\n) at the end of each input block for it to work properly, which is something I want to avoid.