[英]Regular expression including two fixed strings and everything between
I'm not good at all in regex and I'm looking for an expression to get everything between and including either: 我在regex方面一点都不擅长,我正在寻找一个表达式来使所有内容都包含在其中:
<script*/> OR
<script*</script> //asterisk refers to everything between
Basically, I want to copy sections from a single element for print but delete all tags and everything in between 基本上,我想从单个元素中复制部分以进行打印,但要删除所有标签以及之间的所有内容
A single statement that covers both scenarios would be preferable, but two solutions will work just fine 最好涵盖所有两种情况的陈述,但两种解决方案都可以
Any help will be greatly appreciated 任何帮助将不胜感激
这在两种情况下都应该起作用:
<script.*((/>)|(</script>))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.