Uplink Docs Get Uplink
Build a plugin

Phrases and tokens

How a plugin finds words in a text: phrases, tokens like {digits:6}, and what a match gives it.

A plugin finds words in a text with phrases: plain words, like your bill is ready, with tokens where something varies, like amount due {amount}. There are no regular expressions and no code. The app turns each phrase into a search of its own making, with every repeat in it bounded, so a phrase can't run away with a phone however long or strange the text it reads.

A phrase

A phrase is 1 to 120 characters on one line, keeping the rules for words in a plugin. Read from left to right:

The tokens

TokenMatchesFor example
{digits:N-M}A run of N to M digits, not part of a longer run. 1 to 24, and 1-24 if you give no numbers.your code is {digits:4-8} finds 123456 in "Your code is 123456.", and nothing in "Your code is 1234567890".
{number}A number: 1,234, 1.234,5, 98765 or 12.5. The whole run of digits, dots and commas it sits on, or nothing: 192.168.1.1 is no number.order {number} finds 1,234 in "Order 1,234 shipped".
{amount}A number with a currency sign or code before or after it: $45.20, 45,00 EUR, £30. The signs are $, €, £, ¥ and ₹; the codes USD, EUR, GBP, CAD and AUD, in any case.amount due {amount} finds $1,234.56 in "Amount due $1,234.56 by Friday", and nothing in "Amount due 45 by Friday".
{code:N-M}A whole word of N to M letters and digits with at least one digit in it. 4 to 24, and 4-10 if you give no numbers.code {code:4-8} finds AB12CD in "Use code AB12CD to sign in", and nothing in "Use code ABCDEF to sign in".
{word}One word: letters, digits, ' and -.{word} delivery finds Acme in "Your Acme delivery is near".
{words:N-M}N to M words of anything but spaces, between two plain parts of the phrase. 0 to 4, and 1-3 if you give no numbers.your {words:0-3} has shipped finds "new blue parcel" in "Your new blue parcel has shipped!"
{url}A web address starting http://, https:// or www..track {url} finds https://example.com/t/123 in "track https://example.com/t/123 now".
{email}An email address.from {email} finds bob.smith+x@mail.example.co.uk in "Reply from bob.smith+x@mail.example.co.uk."
{phone}A phone number of 7 to 15 digits, with spaces, brackets, dots or dashes among them. The whole run it sits on, or nothing: two numbers with only a space between them read as one run.{phone} finds +1 (555) 010-0100 in "Call +1 (555) 010-0100 today".
{date}A date: 12/03/2026, 2026-11-20, March 5th, 5 jan. Months are in English.on {date} finds March 5th in "Your appointment on March 5th at 3pm".
{time}A time: 3pm, 10:30 a.m., 14:05.at {time} finds 10:30 a.m. in "See you at 10:30 a.m. sharp".

The rules a phrase keeps

A phrase that breaks one of these doesn't load, and says which at its place in the file (rules.tags[0].any[2]). They're checked in this order, and the first one broken is the problem given.

RuleBroken byProblem
Two tokens need something between them.{digits:4}{digits:4}phrase_tokens_touch
A token can't touch a letter or digit. Punctuation may touch one: #{digits:4-10} and code:{code} are fine.bill{digits:4}phrase_token_touches_word
{words} needs a space on each side, so it can't be first or last.{words:1-2} billphrase_words_edge
{url} must be followed by a space or the end of the phrase.{url}.phrase_url_followed
At most 4 tokens, and only one {words} and one {url} among them.a {digits} b {digits} c {digits} d {digits} e {digits}phrase_too_many_tokens
A phrase with no token needs at least two letters or digits.aphrase_too_short

Besides those: a token the app doesn't know, numbers it can't take, a { with no } or a } on its own is phrase_bad_token ({digits:0}, {digits:9-4}, {foo}, code {code:3}, go {words:5}, x {word:2} y, bill }). An empty phrase, one over 120 characters, one with a space at its start or end, a line break or an invisible character is phrase_bad_text.

How a phrase matches

What a match gives

A match gives two things: the whole of what the phrase matched, and what its first token found. A tag rule's detail keeps one of them for its tag, for a row or a copy button to show:

Each is trimmed, and an empty one keeps nothing: your {words:0-3} has shipped matches "Your has shipped", with no detail.

Limits

WhatAt most
A text, as readits first 2,000 characters
A phrase120 characters
Tokens in a phrase4, one {words} and one {url} among them
any, all and none in a rule30, 8 and 20
Phrases in a plugin, every any, all and none200 (too_many_phrases)
Anchorless phrases in a plugin8 (too_many_anchorless)
Plugins on one device, from the Marketplace and in development together16 (too_many_packs)
Phrases in all of a device's plugins1,600 (too_many_phrases)
The person's own words in a wordsFromthe first 50, each cut to 60 characters
What a token finds24 digits; a code of 24; a word of 32; 4 words of 32 each; a web address of 200; an email address of 64 characters, an @, and up to five parts of 63

A slow plugin

A phrase can't run away, but a plugin of 200 phrases on a busy phone could still be slow, so the app times every plugin from the Marketplace or in development as it reads each text:

Examples

PhraseTextGives
your code is {digits:4-8}Your code is 123456.123456
your code is {digits:4-8}Your code is 1234567890no match (ten digits)
code {code:4-8}Use code AB12CD to sign inAB12CD
code {code:4-8}Use code ABCDEF to sign inno match (no digit)
amount due {amount}Amount due $1,234.56 by Friday$1,234.56
amount due {amount}Amount due 45 by Fridayno match (no currency)
amount due {amount}Amount due: 45,00 EURno match (the colon isn't in the phrase)
amount due: {amount}Amount due: 45,00 EUR.45,00 EUR
your {words:0-3} has shippedYour parcel has shippedparcel
your {words:0-3} has shippedYour has shippeda match, with nothing found
your {words:0-3} has shippedYour new blue parcel has shipped!new blue parcel
your {words:0-3} has shippedYour very big new blue parcel has shippedno match (five words)
billYour billing statementno match (not a whole word)
billYour bill is readybill
track {url}Track it: https://example.com/t/123no match (the "it:")
track {url}track https://example.com/t/123 nowhttps://example.com/t/123
{phone}Call +1 (555) 010-0100 today+1 (555) 010-0100
on {date}Your appointment on March 5th at 3pmMarch 5th
on {date}Booked on 12/03/2026.12/03/2026
on {date}See you on 5 jan5 jan
at {time}See you at 3pm3pm
at {time}See you at 10:30 a.m. sharp10:30 a.m.
don't forgetDon’t forget your parcel (a curly apostrophe)Don't forget
your apptYOUR APPT is at 9YOUR APPT
caféLe CAFÉ est ouvertCAFÉ
from {email}Reply from bob.smith+x@mail.example.co.uk.bob.smith+x@mail.example.co.uk
ref #{digits:4-10}Booking ref #88213 confirmed88213
{word} deliveryYour Acme delivery is nearAcme
order {number}Order 1,234 shipped1,234
order {number}Order 98765 shipped98765
tracking no. {code:8-24}Tracking no. JD014600006295117JD014600006295117
ticket {{ref}} {digits:3}Ticket {ref} 123123
50% offGet 50% off today50% off
a.b.csee aXbXc hereno match (a . is a full stop)

Where a phrase has a token, "Gives" is what its first token found; where it has none, the whole match.

The person's own words

A words setting lets the person type words of their own, a line each or with commas between. A tag rule's wordsFrom names that setting, and each of the first 50 entries, cut to 60 characters, becomes a phrase that joins the rule's any. Their words are taken as plain words: braces in them are plain braces, never tokens. They match as any phrase does, as whole words in any case, and an entry that can't be a phrase (a single letter, say) is passed over without a word.

Bills' More words for bills is one, with council tax, water rates as the example in its field.

Something wrong or missing here? Tell us in the Alpha testers circle, or at the app's GitHub.