From 85d17e16496fa1a48931e8b31d810f5312e1572e Mon Sep 17 00:00:00 2001 From: Lauren Ko Date: Wed, 15 Dec 2021 14:51:02 -0600 Subject: [PATCH] Fix solution and typos in Finish the expression --- episodes/02-match-extract-strings.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/episodes/02-match-extract-strings.md b/episodes/02-match-extract-strings.md index 730dbbfd..f4e4178d 100644 --- a/episodes/02-match-extract-strings.md +++ b/episodes/02-match-extract-strings.md @@ -122,10 +122,10 @@ Open the [swcCoC.md file](https://github.com/LibraryCarpentry/lc-data-intro/tree {: .challenge} > ## Finish the expression -> The string after the "@" could contain any kind of word character, special character or digit in any combination and length as well as the dash. In addition, we know that it will with some characters after a period (`.`). Most common domain names have two or three characters, but many more are now possible. Find the latest list [here](http://stats.research.icann.org/dns/tld_report/). What expression would capture this? Hint: the `.` is also a regex expression, so you'll have to use the escape `\` to express a literal period. Note: for the string after the period, we did not try to match a character, since those rarely appear in the characters after the period at the end of an email address. +> The string after the "@" could contain any kind of word character, special character or digit in any combination and length as well as the dash. In addition, we know that it will have some characters after a period (`.`). Most common domain names have two or three characters, but many more are now possible. Find the latest list [here](http://stats.research.icann.org/dns/tld_report/). What expression would capture this? Hint: the `.` is also a metacharacter, so you will have to use the escape `\` to express a literal period. Note: for the string after the period, we did not try to match a `-` character, since those rarely appear in the characters after the period at the end of an email address. > > ## Solution > > ~~~ -> > [\w.-]+\.[\w]{2,3} OR [\w.-]+\.[\w] +> > [\w.-]+\.\w{2,3} OR [\w.-]+\.\w+ > > ~~~ > > See the previous exercise for the explanation of the expression up to the `+` > >