find
Every date, link, email, phone number, address, flight, colour, number, amount of money, length of time, hashtag or mention in text.
Details #
find(kind, text) takes two arguments and returns a list of records.
kind is date, link, email, phone, address, flight, color, number, money, duration, hashtag, mention, all, or several separated by commas such as "date,link". What each one finds, and what its value is, is on the Find in text page.
Each item is a record with kind, text (what matched), start and length (UTF-16 offsets, as macOS counts text) and value. Dates also have duration when the text gives one. With several kinds, items come back in reading order, and where two overlap the more specific kind wins.
Parameters #
Takes 2 arguments.
{{ find(text, b) }}
Examples #
find("link", clipboard())[
]length(find("email,phone", "[email protected] or 555-123-4567"))2Gotchas #
Finding nothing gives an empty list, not an error.
An unknown kind is an error that lists the valid ones:
find() doesn't know the kind 'x'; use date, link, ....Dates are read with the system detector, so wording like
next Fridayuses the real clock.