Find regular expression between html tags [duplicate]
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
regex sublimetext
marked as duplicate by Wiktor Stribiżew
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 '18 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.
add a comment |
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
regex sublimetext
marked as duplicate by Wiktor Stribiżew
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 '18 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 '18 at 13:17
add a comment |
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
regex sublimetext
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
regex sublimetext
edited Nov 12 '18 at 13:21
Vadim Kotov
4,37953247
4,37953247
asked Nov 12 '18 at 13:16
Dragon BallDragon Ball
616
616
marked as duplicate by Wiktor Stribiżew
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 '18 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
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 '18 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 '18 at 13:17
add a comment |
What didn't work? What did you get? What did you expect? What language/tool are you using?
– Toto
Nov 12 '18 at 13:17
What didn't work? What did you get? What did you expect? What language/tool are you using?
– Toto
Nov 12 '18 at 13:17
What didn't work? What did you get? What did you expect? What language/tool are you using?
– Toto
Nov 12 '18 at 13:17
add a comment |
1 Answer
1
active
oldest
votes
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
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
add a comment |
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
add a comment |
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
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
answered Nov 12 '18 at 13:25
TotoToto
65.1k175698
65.1k175698
add a comment |
add a comment |
What didn't work? What did you get? What did you expect? What language/tool are you using?
– Toto
Nov 12 '18 at 13:17