简体   繁体   中英

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:

<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>))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM