Patterns are stored in config.searchPatterns and referenced with
/key/ syntax. No inline regex in HTML — safe by design.
/key/All bridges (string shorthand, searches all fields)
German cars (pattern: VW|BMW|Mercedes, label only)
searchPatterns: {
bridges: 'bridge', // string shorthand
german: { pattern: 'VW|BMW|Mercedes', options: { fields: 'l' } },
}
data-alap-linkitems="/bridges/"
data-alap-linkitems="/german/"
/key/opts
Scenic spots
(searches descriptions: fields: 'd')
Landmarks
(searches tags: fields: 't')
Wikipedia links
(searches URLs: fields: 'u')
German (override to tags)
— expression /t overrides config's fields: 'l'
/scenic/ — config default: fields: 'd' (description)
/landmarks/ — config default: fields: 't' (tags)
/german/t — expression overrides config to search tags instead of labels
Bridges (A-Z) — sorted alphabetically by ID
Top 2 Bridges
— limit: 2, sorted alpha
Recent (30 days)
— items with createdAt within 30 days, newest first
alphaBridges: { pattern: 'bridge', options: { fields: 'l', sort: 'alpha' } }
topBridges: { pattern: 'bridge', options: { fields: 'l', limit: 2, sort: 'alpha' } }
recent: { pattern: '.', options: { age: '30d', sort: 'newest' } }
NYC bridges — regex AND class
Non-NYC bridges — regex WITHOUT class
German or Japanese — regex OR class
German cars, then coffee — regex comma-separated with class
NYC bridges or coffee — regex in parentheses
/bridges/ + .nyc — AND: items matching "bridge" AND tagged "nyc"
/bridges/ - .nyc — WITHOUT: "bridge" matches excluding "nyc"
/german/ | .japan — OR: german regex results merged with .japan class
(/bridges/ + .nyc) | .coffee — parenthesized grouping
Patterns live in config, never in HTML attributes. The parser enforces: max 5 regex atoms per expression, 100 result cap, 20ms timeout. Invalid patterns return empty results silently.