🌱Aadam's Garden

Search

Search IconIcon to open search

Regex Snippets

Last updated Jun 24, 2022

# Remove dots and spaces and page numbers

([\s\.])(?!\1)([\s\.])(?:\1\2)*\1?[0-9]+
Works for extracting TOC from the following format: toc_regex_extractor_example.png

# From TOC to Embeddings

Find ([0-9. ]+)([A-z-, ’:]+)*, Replace $1[[#$2]]