this seems to work
this is one pattern split up across multiple lines with comments
(?x) # free space mode
\/\* # opening brackets
(?: # non-capturing group
[^\/\*]+ # not another opening or closing bracket
(?:\/\*[^\/]+\*\/)? # optional substring within brackets
)* # end the non-capturing group and repeat it 0 or more times
[^/]* # not the closing bracket
\*\/ # closing brackets
but doesn’t that start searching at the beginning of the string… ?
I need to search both directions from a specific position in the string
Ie. from any of the “situation” indicators above… Not search from “A” to find the end of “A”
I could be 10000 characters into the file, but only need to know if the current postion is inside an active “block” comment, this looks like it would find the “next” block comment