MCPcopy Index your code
hub / github.com/clips/pattern / strip_between

Function strip_between

pattern/web/__init__.py:790–795  ·  view source on GitHub ↗

Removes anything between (and including) string a and b inside the given string.

(a, b, string)

Source from the content-addressed store, hash-verified

788 return string
789
790def 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
797def strip_javascript(html):
798 return strip_between("<script.*?>", "</script>", html)

Callers 6

update.pyFile · 0.90
strip_javascriptFunction · 0.85
strip_inline_cssFunction · 0.85
strip_commentsFunction · 0.85
strip_formsFunction · 0.85
_plaintextMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…