Clean up files

Written by

in

Find and replace URLs in text using

(?<=\B)\(http[s]?://[\w\d\-.:]+[/]?([?=@*$&\w:.,;\[\]\-–%!+#:~'/|"éö]+)?[ ]?("[\w\s()\-,.:/#–+\[\]’'!?&äáêéèëíóöüúćçñ²Σ′;= ]+")?\)

Display all unique unicode characters in a folder containing .md files.

python3 -c 'import glob; print("\n".join(sorted({f"{c!r}: U+{ord(c):04X}" for fn in glob.glob("*.md") for c in open(fn, encoding="utf-8", errors="ignore").read()})))'

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *