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.
- Select some text elsewhere and copy it to the clipboard.
- Come to this page and paste that text in, with your system's keyboard shortcut or the button in the header.
- Copy the converted text back out to the clipboard, again using either your system's keyboard shortcut or the button.
- 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
From | To | Endings |
---|---|---|
anaesthetic | anesthetic | -s |
behaviour | behavior | -s |
behavioural | behavioral | |
belabour | belabor | -s, -ed, -ing |
benefitted | benefited | |
benefitting | benefiting | |
calibre | caliber | -s |
cancellable | cancelable | |
cancellation | cancelation | -s |
cancelled | canceled | |
cancelling | canceling | |
catalog | catalogue | -s, -ed, -ing |
centimetre | centimeter | -s |
centre | center | -s |
centred | centered | |
centring | centering | |
cheque | check | -s, -ing |
chequebook | checkbook | -s |
chequing account | checking account | -s |
chequings account | checkings account | -s |
colour | color | -s, -ed, -ing |
combatting | combating | |
counselled | counseled | |
counselling | counseling | |
defence | defense | -s |
dialled | dialed | |
dialling | dialing | |
discolour | discolor | -s, -ed, -ing |
discolouration | discoloration | -s |
endeavour | endeavor | -s, -ed, -ing |
enquire | inquire | -s, -ed, -ing |
enquiry | inquiry | -s |
epicentre | epicenter | -s |
favour | favor | -s, -ed, -ing |
favourable | favorable | |
favourably | favorably | |
fibre | fiber | |
flavour | flavor | -s, -ed, -ing |
formulae | formulas | |
grey | gray | -s, -ed, -ing |
honour | honor | -s, -ed, -ing |
honourable | honorable | |
honourably | honorably | |
honourary | honorary | |
humour | humor | -s, -ed, -ing |
humourous | humorous | |
humourously | humorously | |
kilometre | kilometer | -s |
labelled | labeled | |
labelling | labeling | |
labour | labor | -s, -ed, -ing |
labourious | laborious | |
licence | license | -s |
likeable | likable | |
litre | liter | -s |
marshalled | marshaled | |
marshalling | marshaling | |
metre | meter | -s |
millilitre | milliliter | -s |
millimetre | millimeter | -s |
misdemeanour | misdemeanor | -s |
modelling | modeling | |
neighbour | neighbor | -s |
neighbourhood | neighborhood | |
odour | odor | -s |
odourless | odorless | |
offence | offense | -s |
paycheque | paycheck | -s |
practise | practice | -s, -ed, -ing |
practised | practiced | |
practising | practicing | |
rumour | rumor | -s |
rumoured | rumored | -s |
saleable | salable | |
sombre | somber | |
sombrely | somberly | |
splendour | splendor | -s |
storey | story | -s |
theatre | theater | -s |
totalled | totaled | |
totalling | totaling | |
travelled | traveled | |
travelling | traveling | |
tumour | tumor | -s |
unfavourable | unfavorable | |
vapour | vapor | -s |
American to Canadian
From | To | Endings |
---|---|---|
behavior | behaviour | -s |
behavioral | behavioural | |
belabor | belabour | -s, -ed, -ing |
benefited | benefitted | |
benefiting | benefitting | |
caliber | calibre | -s |
cancelable | cancellable | |
cancelation | cancellation | -s |
canceled | cancelled | |
canceling | cancelling | |
catalogue | catalog | -s, -ed, -ing |
center | centre | -s |
centered | centred | |
centering | centring | |
centimeter | centimetre | -s |
checkbook | chequebook | -s |
checking account | chequing account | -s |
checkings account | chequings account | -s |
color | colour | -s, -ed, -ing |
combating | combatting | |
counseled | counselled | |
counseling | counselling | |
defense | defence | -s |
dialed | dialled | |
dialing | dialling | |
discolor | discolour | -s, -ed, -ing |
discoloration | discolouration | -s |
endeavor | endeavour | -s, -ed, -ing |
epicenter | epicentre | -s |
favor | favour | -s, -ed, -ing |
favorable | favourable | |
favorably | favourably | |
fiber | fibre | |
flavor | flavour | -s, -ed, -ing |
gray | grey | -s, -ed, -ing |
honor | honour | -s, -ed, -ing |
honorable | honourable | |
honorably | honourably | |
honorary | honourary | |
humor | humour | -s, -ed, -ing |
humorous | humourous | |
humorously | humourously | |
kilometer | kilometre | -s |
labeled | labelled | |
labeling | labelling | |
labor | labour | -s, -ed, -ing |
laborious | labourious | |
license revenue | licence revenue | |
liter | litre | -s |
marshaled | marshalled | |
marshaling | marshalling | |
milliliter | millilitre | -s |
millimeter | millimetre | -s |
misdemeanor | misdemeanour | -s |
modeling | modelling | |
neighbor | neighbour | -s |
neighborhood | neighbourhood | |
odor | odour | -s |
odorless | odourless | |
offense | offence | -s |
paycheck | paycheque | -s |
practiced | practised | |
practiced | practised | |
practicing | practising | |
practicing | practising | |
rumor | rumour | -s |
rumored | rumoured | -s |
somber | sombre | |
somberly | sombrely | |
splendor | splendour | -s |
theater | theatre | -s |
totaled | totalled | |
totaling | totalling | |
traveled | travelled | |
traveling | travelling | |
tumor | tumour | -s |
unfavorable | unfavourable | |
vapor | vapour | -s |
Regexs Last Updated
2024-06-02 00:02:54Z