Removes anything between (and including) string a and b inside the given string.
(a, b, string)
| 788 | return string |
| 789 | |
| 790 | def strip_between(a, b, string): |
| 791 | """ Removes anything between (and including) string a and b inside the given string. |
| 792 | """ |
| 793 | p = "%s.*?%s" % (a, b) |
| 794 | p = re.compile(p, re.DOTALL | re.I) |
| 795 | return re.sub(p, "", string) |
| 796 | |
| 797 | def strip_javascript(html): |
| 798 | return strip_between("<script.*?>", "</script>", html) |
no outgoing calls
no test coverage detected
searching dependent graphs…