Skip to content

Instantly share code, notes, and snippets.

@saravanabalagi
Created December 2, 2024 17:23
Show Gist options
  • Save saravanabalagi/11f9994e44cda3db9d885f28368a1471 to your computer and use it in GitHub Desktop.
Save saravanabalagi/11f9994e44cda3db9d885f28368a1471 to your computer and use it in GitHub Desktop.
Regex for US to UK english to replace "iz" with "is"

Regex for US to UK english

To replace "iz" with "is" in LATEX documents:

  • find
(?<!\\(?:cite|href|url)\{[^}]*)(\b(?!size\b|sizes\b|sized\b|downsize\b|footnotesize\b|BSize\b|resized\b|quantize\b|quantization\b|horizontally\b|itemize\b|scriptsize\b|resize\b|horizontal\b|Webviz\b|OdoViz\b)\w*)iz(\w*\b)
  • replace
$1is$2

Missing words

This will still miss words like:

  • labeled
  • analyze

which will need to be manually checked.

Excluded words

Note that some tech words like:

  • quantization are

in the exclude list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment