↩ Back

Usage

As webpages go, this one has an unusual interaction model. It starts with the assumption that the text you want to convert is already in some document, email, etc, and that it will be pasted back into that other place.

As such, there are four steps.

  1. Select some text elsewhere and copy it to the clipboard.
  2. Come to this page and paste that text in, with your system's keyboard shortcut or the button in the header.
  3. Copy the converted text back out to the clipboard, again using either your system's keyboard shortcut or the button.
  4. Paste the result back into your original app or document.

Privacy

Nothing is tracked, there is no server or even any cookies. The text you are converting never leaves your browser.

The code is tiny and readable, so if you are a programmer, you can verify this yourself.

The Story in Three Toots

At the end of May, 2024, @evilchili@linernotes.club posted on Mastodon:

Hey Canadian nerds! I have held the domain registration for regex.ca for a very long time. When I lived in Canada it was my primary domain, but I haven't used it for years. Does anyone on the fediverse have a good use for it?

I'm going to release it but if you've got a good pitch I'll pay for a 1 year renewal and then transfer it to your ownership.

That prompted an idea from @sillygwailo@mastodon.social:

Not a real pitch: A website that, using regular expressions, converts an English sentence from non-Canadian spelling to Canadian spelling.

And that idea lead to an equally offhand response from @blakecoverett@hachyderm.io:

Amusingly, I made one of those, using primarily regexes. It does other, domain-specific, things as well - but that was the original driving use case. And Canadian to American as well. Sadly, it's a company internal thing.

A bit more back and forth, gracious permission from the company the original code was written for, and three days later we have this quirky little tool.

Open Source

This tool is a mixture of C# that runs at build time to generate the regular expressions and vanilla Javascript that executes those regexes on your text in the browser. See the details at https://github.com/bcdev-com/canadian-eh.

If you want to use the core functionality in other code, replacements.js is everything you need at runtime.

If you find words that it should be converting but does not, please file an issue on GitHub. Note that not all conversions can be performed both directions. For example, Canadians use license as a verb but licence as a noun, so going from Canadian to American it is always safe to chance it to license, but going the other way it can't be automated without a full understanding of English grammar and context.

The Raw Data

Canadian to American

FromToEndings
anaestheticanesthetic-s
behaviourbehavior-s
behaviouralbehavioral
belabourbelabor-s, -ed, -ing
benefittedbenefited
benefittingbenefiting
calibrecaliber-s
cancellablecancelable
cancellationcancelation-s
cancelledcanceled
cancellingcanceling
catalogcatalogue-s, -ed, -ing
centimetrecentimeter-s
centrecenter-s
centredcentered
centringcentering
chequecheck-s, -ing
chequebookcheckbook-s
chequing accountchecking account-s
chequings accountcheckings account-s
colourcolor-s, -ed, -ing
combattingcombating
counselledcounseled
counsellingcounseling
defencedefense-s
dialleddialed
diallingdialing
discolourdiscolor-s, -ed, -ing
discolourationdiscoloration-s
endeavourendeavor-s, -ed, -ing
enquireinquire-s, -ed, -ing
enquiryinquiry-s
epicentreepicenter-s
favourfavor-s, -ed, -ing
favourablefavorable
favourablyfavorably
fibrefiber
flavourflavor-s, -ed, -ing
formulaeformulas
greygray-s, -ed, -ing
honourhonor-s, -ed, -ing
honourablehonorable
honourablyhonorably
honouraryhonorary
humourhumor-s, -ed, -ing
humouroushumorous
humourouslyhumorously
kilometrekilometer-s
labelledlabeled
labellinglabeling
labourlabor-s, -ed, -ing
labouriouslaborious
licencelicense-s
likeablelikable
litreliter-s
marshalledmarshaled
marshallingmarshaling
metremeter-s
millilitremilliliter-s
millimetremillimeter-s
misdemeanourmisdemeanor-s
modellingmodeling
neighbourneighbor-s
neighbourhoodneighborhood
odourodor-s
odourlessodorless
offenceoffense-s
paychequepaycheck-s
practisepractice-s, -ed, -ing
practisedpracticed
practisingpracticing
rumourrumor-s
rumouredrumored-s
saleablesalable
sombresomber
sombrelysomberly
splendoursplendor-s
storeystory-s
theatretheater-s
totalledtotaled
totallingtotaling
travelledtraveled
travellingtraveling
tumourtumor-s
unfavourableunfavorable
vapourvapor-s

American to Canadian

FromToEndings
behaviorbehaviour-s
behavioralbehavioural
belaborbelabour-s, -ed, -ing
benefitedbenefitted
benefitingbenefitting
calibercalibre-s
cancelablecancellable
cancelationcancellation-s
canceledcancelled
cancelingcancelling
cataloguecatalog-s, -ed, -ing
centercentre-s
centeredcentred
centeringcentring
centimetercentimetre-s
checkbookchequebook-s
checking accountchequing account-s
checkings accountchequings account-s
colorcolour-s, -ed, -ing
combatingcombatting
counseledcounselled
counselingcounselling
defensedefence-s
dialeddialled
dialingdialling
discolordiscolour-s, -ed, -ing
discolorationdiscolouration-s
endeavorendeavour-s, -ed, -ing
epicenterepicentre-s
favorfavour-s, -ed, -ing
favorablefavourable
favorablyfavourably
fiberfibre
flavorflavour-s, -ed, -ing
graygrey-s, -ed, -ing
honorhonour-s, -ed, -ing
honorablehonourable
honorablyhonourably
honoraryhonourary
humorhumour-s, -ed, -ing
humoroushumourous
humorouslyhumourously
kilometerkilometre-s
labeledlabelled
labelinglabelling
laborlabour-s, -ed, -ing
laboriouslabourious
license revenuelicence revenue
literlitre-s
marshaledmarshalled
marshalingmarshalling
millilitermillilitre-s
millimetermillimetre-s
misdemeanormisdemeanour-s
modelingmodelling
neighborneighbour-s
neighborhoodneighbourhood
odorodour-s
odorlessodourless
offenseoffence-s
paycheckpaycheque-s
practicedpractised
practicedpractised
practicingpractising
practicingpractising
rumorrumour-s
rumoredrumoured-s
sombersombre
somberlysombrely
splendorsplendour-s
theatertheatre-s
totaledtotalled
totalingtotalling
traveledtravelled
travelingtravelling
tumortumour-s
unfavorableunfavourable
vaporvapour-s

Regexs Last Updated

2024-06-02 00:02:54Z

↩ Back