regexp draft

This commit is contained in:
Ilya Kantor 2019-03-02 12:17:42 +03:00
parent 65184edf76
commit 7888439420
4 changed files with 42 additions and 41 deletions

View file

@ -18,7 +18,7 @@ The pattern `pattern:^Mary` means: "the string start and then Mary".
Now let's test whether the text ends with an email.
To match an email, we can use a regexp `pattern:[-.\w]+@([\w-]+\.)+[\w-]{2,20}`. It's not perfect, but mostly works.
To match an email, we can use a regexp `pattern:[-.\w]+@([\w-]+\.)+[\w-]{2,20}`.
To test whether the string ends with the email, let's add `pattern:$` to the pattern: