Show pageOld revisionsBacklinksAdd to bookExport to PDFBack to top You've loaded an old revision of the document! If you save it, you will create a new version with this data. Media Files====== RegExp ====== ===== Textpad ===== Remove shared JS from Plotly pages: * Find: <code>\n <script type="text/javascript">(?s).*\(27\)\}\)\);</script></code> * Replace: <code><script type="text/javascript" src="plotly.js"></script></code> Remove double space from Plotly pages: * Find: <code>\s{2,}+</code> * Replace: <code> </code> Add title to Plotly pages: * Find: <code><head><meta</code> * Replace: <code><head><title>IsItHotInHere.org - Climate data illustrated</title><meta</code> ===== Python ===== To match unicode whitespace: <code> import re _RE_COMBINE_WHITESPACE = re.compile(r"\s+") my_str = _RE_COMBINE_WHITESPACE.sub(" ", my_str).strip() </code> To match ASCII whitespace only: <code> import re _RE_COMBINE_WHITESPACE = re.compile(r"(?a:\s+)") _RE_STRIP_WHITESPACE = re.compile(r"(?a:^\s+|\s+$)") my_str = _RE_COMBINE_WHITESPACE.sub(" ", my_str) my_str = _RE_STRIP_WHITESPACE.sub("", my_str) </code> SavePreviewCancel Edit summary regexp.1624876647.txt.gz Last modified: 2021/06/28 18:37by 192.168.1.50