Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
((?:.|\n)*)\n\nExcerpt(?:(?:.|\n)*)
/
gm

Description

Scribd is a great resource for reading more than you would be able to otherwise, but the app sucks. And in particular, it sucks if you want to copy your highlights to another app, because it automatically adds the book, author, and a link to Scribd with every copy.

This regex simple eliminates all the additional garbage after the quote you want.

Submitted by derBingle - 2 years ago