From 64a1716d71607f9ff6f9d4641805380241ef7892 Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Wed, 20 Jun 2018 04:09:36 -0500 Subject: [PATCH] suprinsingly -> surprisingly (#658) one char typo --- strings.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strings.Rmd b/strings.Rmd index 033316d..9a424dc 100644 --- a/strings.Rmd +++ b/strings.Rmd @@ -519,7 +519,7 @@ r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] ?:\r\n)?[ \t])*))*)?;\s*) ``` -This is a somewhat pathological example (because email addresses are actually suprisingly complex), but is used in real code. See the stackoverflow discussion at for more details. +This is a somewhat pathological example (because email addresses are actually surprisingly complex), but is used in real code. See the stackoverflow discussion at for more details. Don't forget that you're in a programming language and you have other tools at your disposal. Instead of creating one complex regular expression, it's often easier to write a series of simpler regexps. If you get stuck trying to create a single regexp that solves your problem, take a step back and think if you could break the problem down into smaller pieces, solving each challenge before moving onto the next one.