Find regular expression between html tags [duplicate]










0















This question already has an answer here:



  • Sublime Text regex not detecting multiline tags

    2 answers



I'm, trying to find the regex for this pattern. I have tried a few things but none of them of work.



I tried this
</a>(.*?)<a name



<a name="13" class="anchor"></a>
Some Content here
<a name="14" class="anchor"></a>


So my expected result should be Some Content here










share|improve this question















marked as duplicate by Wiktor Stribiżew regex
Users with the  regex badge can single-handedly close regex questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Nov 12 at 13:39


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • What didn't work? What did you get? What did you expect? What language/tool are you using?
    – Toto
    Nov 12 at 13:17















0















This question already has an answer here:



  • Sublime Text regex not detecting multiline tags

    2 answers



I'm, trying to find the regex for this pattern. I have tried a few things but none of them of work.



I tried this
</a>(.*?)<a name



<a name="13" class="anchor"></a>
Some Content here
<a name="14" class="anchor"></a>


So my expected result should be Some Content here










share|improve this question















marked as duplicate by Wiktor Stribiżew regex
Users with the  regex badge can single-handedly close regex questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Nov 12 at 13:39


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • What didn't work? What did you get? What did you expect? What language/tool are you using?
    – Toto
    Nov 12 at 13:17













0












0








0








This question already has an answer here:



  • Sublime Text regex not detecting multiline tags

    2 answers



I'm, trying to find the regex for this pattern. I have tried a few things but none of them of work.



I tried this
</a>(.*?)<a name



<a name="13" class="anchor"></a>
Some Content here
<a name="14" class="anchor"></a>


So my expected result should be Some Content here










share|improve this question
















This question already has an answer here:



  • Sublime Text regex not detecting multiline tags

    2 answers



I'm, trying to find the regex for this pattern. I have tried a few things but none of them of work.



I tried this
</a>(.*?)<a name



<a name="13" class="anchor"></a>
Some Content here
<a name="14" class="anchor"></a>


So my expected result should be Some Content here





This question already has an answer here:



  • Sublime Text regex not detecting multiline tags

    2 answers







regex sublimetext






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 12 at 13:21









Vadim Kotov

4,31153247




4,31153247










asked Nov 12 at 13:16









Dragon Ball

615




615




marked as duplicate by Wiktor Stribiżew regex
Users with the  regex badge can single-handedly close regex questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Nov 12 at 13:39


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Wiktor Stribiżew regex
Users with the  regex badge can single-handedly close regex questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Nov 12 at 13:39


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • What didn't work? What did you get? What did you expect? What language/tool are you using?
    – Toto
    Nov 12 at 13:17
















  • What didn't work? What did you get? What did you expect? What language/tool are you using?
    – Toto
    Nov 12 at 13:17















What didn't work? What did you get? What did you expect? What language/tool are you using?
– Toto
Nov 12 at 13:17




What didn't work? What did you get? What did you expect? What language/tool are you using?
– Toto
Nov 12 at 13:17












1 Answer
1






active

oldest

votes


















2














This does the job:



Find: </a>s*K[sS]*?(?=<a name)



Explanation:



</a>s* # </a> followed by 0 or more spaces
K # forget all we have seen until this position
[sS]*? # 0 or more any character, including linebreaks
(?=<a name) # positive lookahead, make sure we have "<a name" after





share|improve this answer



























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    This does the job:



    Find: </a>s*K[sS]*?(?=<a name)



    Explanation:



    </a>s* # </a> followed by 0 or more spaces
    K # forget all we have seen until this position
    [sS]*? # 0 or more any character, including linebreaks
    (?=<a name) # positive lookahead, make sure we have "<a name" after





    share|improve this answer

























      2














      This does the job:



      Find: </a>s*K[sS]*?(?=<a name)



      Explanation:



      </a>s* # </a> followed by 0 or more spaces
      K # forget all we have seen until this position
      [sS]*? # 0 or more any character, including linebreaks
      (?=<a name) # positive lookahead, make sure we have "<a name" after





      share|improve this answer























        2












        2








        2






        This does the job:



        Find: </a>s*K[sS]*?(?=<a name)



        Explanation:



        </a>s* # </a> followed by 0 or more spaces
        K # forget all we have seen until this position
        [sS]*? # 0 or more any character, including linebreaks
        (?=<a name) # positive lookahead, make sure we have "<a name" after





        share|improve this answer












        This does the job:



        Find: </a>s*K[sS]*?(?=<a name)



        Explanation:



        </a>s* # </a> followed by 0 or more spaces
        K # forget all we have seen until this position
        [sS]*? # 0 or more any character, including linebreaks
        (?=<a name) # positive lookahead, make sure we have "<a name" after






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 12 at 13:25









        Toto

        64.6k175698




        64.6k175698













            這個網誌中的熱門文章

            How to read a connectionString WITH PROVIDER in .NET Core?

            In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

            Museum of Modern and Contemporary Art of Trento and Rovereto