Try the following regex:
<[^\/a] *[^>]*>[^<]*(textToMatch)
Details:
<
- <
(literally) - start of a tag,
[^\/a]
- something other than a
(to exclude anchor tag) or /
(to exclude any closing tag)
*
- (space and asterrisk) - an optional space,
[^>]*>
- a possibly empty sequence of chars other than >
(inner part of the opening tag) and >
(closing the opening tag),
[^<]*
- a possibly empty sequence of chars other than <
(no other opening/closing tag),
(textToMatch)
- the text to match as a capturing group.
This way the "preceding stuff" matched is as the main body of the match,
but the text you actually want to match is in capturing group No 1.
The "preceding stuff" can not be included as any lookbehind, because
lookbehind must have a fixed length.
For a working example see https://regex101.com/r/MKf2y7/1