Skip to main content Link Menu Expand (external link) Left Arrow Right Arrow Document Search Copy Copied

Workshop Title Slide

Introduction to Pattern Matching with Regular Expressions

Everyone has searched for text on a web page, or may have tried replacing words in a document using a “Find and Replace” tool. These searches tend to be rather simple, however some programs and tools allow for more complex and powerful searches using ‘regular expressions’.

In this workshop, you will dive into the intricacies of regular expressions to find, capture, verify, and replace text.

Learning Objectives

By the end of this workshop, you will be able to:

  • Create regular expressions to search for text.
  • Use capture groups to gather data in text.
  • Assert conditions in your matches using lookarounds.

Duration (optional)

This module will take around 1 to 2 hours, however feel free to work at your own pace!

Land Acknowledgement

McMaster University is situated in Ohròn:wakon which is the traditional territories of the Erie, Neutral, Huron-Wendat, Haudenosaunee and Mississaugas. This land is covered by the “Dish With One Spoon Wampum Belt Covenant”, an agreement between the Haudenosaunee confederacy and Anishinaabe nations to ensure those who live here take only what they need, leave enough in the dish for others, and keep the dish clean. This land is also covered by the Between the Lakes Treaty of 1792 and is very close to the 1784 Haldimand Treaty, which holds the land six miles to each side of the Grand River as a tract for Six Nations, which is currently not being honored.

Many of us at the Sherman Centre took the First Nations’ Information Governance Centre’s OCAP course this past year which stands for Ownership, Control, Access, and Possession. We encourage you to learn more about OCAP and Indigenous data management practices more broadly, including the OCAS principles endorsed by the Manitoba Métis Federation, the principles of Inuit Qaujimajatuqangit, ᐃᓄᐃᑦ ᑕᐱᕇᑦ ᑲᓇᑕᒥ (Inuit Tapiriit Kanatami) National Inuit Strategy on Research, and Global Indigenous Data Alliance’s CARE principles.