I searched and found that [^?] will not include a certain character, such as a question mark in this case, but it seems to include a space instead which is not what I want. This pattern:
\((.*?)\)[^?]
matches anything in brackets unless there is a question mark right after the last bracket.
(need to capture including brackets) ignore this
(ignore this completely)?
This pattern captures the top line in brackets correctly without including the space, but also captures the line below which I want to ignore:
\((.*?)\)
What pattern can I use to capture the top line only without the trailing space but ignore the line below?
You can see that neither of these patterns work correctly:
