文字遵循这种模式
<tr class="text" (any sequence of characters here, except ABC)ABC(any sequence of characters here, except ABC)
<tr class="text" (any sequence of characters here, except ABC)ABC(any sequence of characters here, except ABC)
<tr class="text" (any sequence of characters here, except ABC)ABC(any sequence of characters here, except ABC)
<tr class="text" (any sequence of characters here, except ABC)ABC(any sequence of characters here, except ABC)
所以基本上上面的行(可能包括换行符)可能会重复多次,这个想法是在 ABC 之后立即检索前 3 个字符。
我已经尝试过正则表达式
\<tr class="text" [.\n]+ABC(?<capture>[.]{3})
但他们都失败了。有人可以给我一个提示吗?