Mastering text with Regular Expressions

Have you ever wanted to extract phone numbers out of a block of unstructured text? Or email addresses. Or find all the words that start with “e” and end with “ed”, no matter their length? Or search through DNA sequences for a pattern? Or extract coordinates from GPS data?

Regular Expressions (regexes) are a powerful way to handle a multitude of different types of data. They can be used to find patterns in text and make sophisticated replacements. Think of them as find and replace on steroids. Come along to this workshop to learn what they can do and how to apply them to your research.

You'll learn:

  • Comprehend and apply the syntax of regular expressions
  • Use the http://regexr.com tool to test a regular expression against some text
  • Construct simple regular expressions to find capitalised words; all numbers; all words that start with a specific set of letters, etc. in a block of text
  • Craft and test a progressively more complex regular expression
  • Find helpful resources covering regular expressions on the web

Prerequisites:

Comprehend and apply the syntax of regular expressions

Use the http://regexr.com tool to test a regular expression against some text

Construct simple regular expressions to find capitalised words; all numbers; all words that start with a specific set of letters, etc. in a block of text

Craft and test a progressively more complex regular expression

Find helpful resources covering regular expressions on the web

For more information, please click here.

Licence: All Rights Reserved

Contact: training@intersect.org.au

Keywords: Data Analysis, Regular Expressions


Additional information

Status: Active

Mastering text with Regular Expressions https://dresa.org.au/materials/mastering-text-with-regular-expressions Have you ever wanted to extract phone numbers out of a block of unstructured text? Or email addresses. Or find all the words that start with “e” and end with “ed”, no matter their length? Or search through DNA sequences for a pattern? Or extract coordinates from GPS data? Regular Expressions (regexes) are a powerful way to handle a multitude of different types of data. They can be used to find patterns in text and make sophisticated replacements. Think of them as find and replace on steroids. Come along to this workshop to learn what they can do and how to apply them to your research. #### You'll learn: - Comprehend and apply the syntax of regular expressions - Use the http://regexr.com tool to test a regular expression against some text - Construct simple regular expressions to find capitalised words; all numbers; all words that start with a specific set of letters, etc. in a block of text - Craft and test a progressively more complex regular expression - Find helpful resources covering regular expressions on the web #### Prerequisites: Comprehend and apply the syntax of regular expressions Use the http://regexr.com tool to test a regular expression against some text Construct simple regular expressions to find capitalised words; all numbers; all words that start with a specific set of letters, etc. in a block of text Craft and test a progressively more complex regular expression Find helpful resources covering regular expressions on the web **For more information, please click [here](https://intersect.org.au/training/course/regex101).** training@intersect.org.au Data Analysis, Regular Expressions