Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| regexp [2021/06/28 00:34] – created 192.168.1.50 | regexp [2024/08/11 00:15] (current) – admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== RegExp ====== | ====== RegExp ====== | ||
| + | ===== Flexible Renamer ===== | ||
| + | After.Midnight mkv's | ||
| + | * Find: < | ||
| + | * Replace: < | ||
| ===== Textpad ===== | ===== Textpad ===== | ||
| Remove shared JS from Plotly pages: | Remove shared JS from Plotly pages: | ||
| * Find: < | * Find: < | ||
| * Replace: < | * Replace: < | ||
| + | |||
| + | Remove double space from Plotly pages: | ||
| + | * Find: < | ||
| + | * Replace: < | ||
| + | |||
| + | Add title to Plotly pages: | ||
| + | * Find: < | ||
| + | * Replace: < | ||
| + | |||
| + | ===== Python ===== | ||
| + | To match unicode whitespace: | ||
| + | < | ||
| + | import re | ||
| + | |||
| + | _RE_COMBINE_WHITESPACE = re.compile(r" | ||
| + | |||
| + | my_str = _RE_COMBINE_WHITESPACE.sub(" | ||
| + | </ | ||
| + | To match ASCII whitespace only: | ||
| + | < | ||
| + | import re | ||
| + | |||
| + | _RE_COMBINE_WHITESPACE = re.compile(r" | ||
| + | _RE_STRIP_WHITESPACE = re.compile(r" | ||
| + | |||
| + | my_str = _RE_COMBINE_WHITESPACE.sub(" | ||
| + | my_str = _RE_STRIP_WHITESPACE.sub("", | ||
| + | </ | ||
| + | |||