-2
American Spelling British Spelling
defen(s)e defen(c)e
([A-Za-z]+)ize ([A-Za-z]+)ise

[A-Za-z]+ is a regular expression meaning "one or more letters"

We do not have to use regular expressions in order to define our replacement rules, but that is standard practice for many professionals who know how to write code for computer applications.

Feel free to use the notation of your choice in an answer to this question.

4
  • 2
    Your second rule is simply wrong, because it is not true that British spelling exclusively uses -ise where US spelling uses -ize. Many people in Britain have a strong preference for -ise, but Oxford University Press prefers -ize. So both spellings are used in BrE. Lynne Murphy points out in The Prodigal Tongue how it was Microsoft's spell checker that did most to create the impression that only -ise is acceptable in BrE, by prioritizing consistency over reality.
    – Colin Fine
    Jun 2 at 22:41
  • 1
    @ColinFine Yes, and of course this "replacement rule" fails entirely for words like "size", "wise", etc. Jun 2 at 22:46
  • What did your research reveal? There are plenty of lists (on various webpages as well as other sources) of differences between British and American spelling. Why are those insufficient? Jun 2 at 22:48
  • 1
    I cannot begin to describe how fundamentally misconceived this question is. Into the bargain, it has a deeply irritating 'feel free...' section. If I could cast a hundred downvotes and an equal number of close votes, I would. Jun 2 at 23:03

1 Answer 1

2

It is not possible to convert American English to British English using a purely mechanical approach of the type you describe. For example, the American English noun "program" should either be left as "program" or rewritten as "programme" depending on whether it refers to a computer program or a programme of events. Similarly, the American English word "practice" should be converted to "practise" when it appears as a verb but not when it appears as a noun.

1
  • 1
    If only everything in life could be reduced to a regex! Jun 2 at 22:59

Not the answer you're looking for? Browse other questions tagged .