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










  • I can't get the intermediate HTML tags. I'm using sublime text to find this pattern.
    – Dragon Ball
    Nov 12 at 13:19















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










  • I can't get the intermediate HTML tags. I'm using sublime text to find this pattern.
    – Dragon Ball
    Nov 12 at 13:19













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,30153247




4,30153247










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










  • I can't get the intermediate HTML tags. I'm using sublime text to find this pattern.
    – Dragon Ball
    Nov 12 at 13:19
















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










  • I can't get the intermediate HTML tags. I'm using sublime text to find this pattern.
    – Dragon Ball
    Nov 12 at 13:19















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












I can't get the intermediate HTML tags. I'm using sublime text to find this pattern.
– Dragon Ball
Nov 12 at 13:19




I can't get the intermediate HTML tags. I'm using sublime text to find this pattern.
– Dragon Ball
Nov 12 at 13:19












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.4k175697




        64.4k175697













            Popular posts from this blog

            Top Tejano songwriter Luis Silva dead of heart attack at 64

            政党

            天津地下鉄3号線