Grep Styles - GitBruno/Novelty GitHub Wiki
Expressions for content styling with GREP-Styles in Adobe InDesign
Capitals
Words. 4WD
\<[A-Z\d]{3,}\>
Sentences. 2 MUCH CAPS 4 U
[A-Z\d][A-Z\d[:space:]"']*[A-Z\d]\b
Or if you need something more complex, only digits that are inside all caps:
(?![\d[:space:]]+)([A-Z\d][A-Z\d[:space:]"']*[A-Z\d])(?![:space:]][\d[:space:]]+)
Chapter Number
Chapter number. Chapter 01
(?i)(chapter)(\s+)((0+)?(\d+))
Note: Chapter text is in
$1
number in$3
, Number without leading zero in$5
Starting Quote
Start quotation for paragraphs using drop caps. “
or ‘
^['"]
Ellipsis
Tracking ellipsis. . . .
(\.\s?\.\s?\.)(\s?\.)?
Space before ellipsis that ends a paragraph.
Control width of space before. #
. . .LF
\s(?=(\.\s?\.\s?\.)([\s\.]+)?\r)
Endorsement
Endorser. Bruno Herfst
(?<=['"—–])([\s\w]+$)
Ordinals
Ordinal indicators nd
(?<=\d)((st )|(th )|(rd )|(nd ))
Time
Time format. 9.23 | 14:34 | 00:00:00
\d*\d[:\.]\d\d([:\.]\d\d)?
Devision. am | P.M.
(?<=\d)\s?([apAP]\.?[mM]\.?)
URLs
Hyperlinks. www.brunoherfst.com
((ht|f)tp:\/\/)?w{3,}\.[a-zA-Z0-9_\-.:#/~}]+
Widows and orphans (Non-breaking Style)
Space after I's, A's or a's. I
(?<=[\s'"][IAa])\s
Last space in paragraph.
\s(?=\w+[:punct:](/GitBruno/Novelty/wiki/:punct:)*\r)
Synthetic chemical element
Am|B[hk]|C[fmn]|D[bs]|Es|F[lm]|Hs|L[rv]|M[dt]|No|R[fg]|Sg|Uu[opst]