I'm looking to search for all \(\d+\) expressions in a file which satisfy the below conditions:
1. The expression "\(\d+\)" should not be immediately followed by the string "</xref>"
2. The search should avoid any/all expression "\(\d+\)" if that expression is inside tags "<inline>....</inline>" and "<disp>...</disp>"
sample text:(just random gibberish text)
I <xref rid="eqn1">(1)</xref> dsf dsf fd (6) dfd dsf dfds sdfds dsfds
(16) to dsfds <inline>df fds (10) dsf</inline> fsdf <disp>adf dsf df (3)fa</disp>
lp fds f dsf sfds <inline>df fds (5)</inline>
The search pattern will only find the red colored expressions in the above sample.
\(\d+\)(?!</xref>) only satisfies the 1st condition and I cannot figure out how to add condition 2 into the mix(if possible at all)
Can anyone help
1. The expression "\(\d+\)" should not be immediately followed by the string "</xref>"
2. The search should avoid any/all expression "\(\d+\)" if that expression is inside tags "<inline>....</inline>" and "<disp>...</disp>"
sample text:(just random gibberish text)
I <xref rid="eqn1">(1)</xref> dsf dsf fd (6) dfd dsf dfds sdfds dsfds
(16) to dsfds <inline>df fds (10) dsf</inline> fsdf <disp>adf dsf df (3)fa</disp>
lp fds f dsf sfds <inline>df fds (5)</inline>
The search pattern will only find the red colored expressions in the above sample.
\(\d+\)(?!</xref>) only satisfies the 1st condition and I cannot figure out how to add condition 2 into the mix(if possible at all)
Can anyone help