From 41314f13642241893e3a377690f89961df680c7a Mon Sep 17 00:00:00 2001 From: Mario Kandut Date: Fri, 8 Mar 2019 23:50:49 +0100 Subject: [PATCH] add: content for challenge - match ending string patterns (#31774) --- .../match-ending-string-patterns/index.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-ending-string-patterns/index.md b/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-ending-string-patterns/index.md index d688bd9130..73308c8ec1 100644 --- a/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-ending-string-patterns/index.md +++ b/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-ending-string-patterns/index.md @@ -3,8 +3,21 @@ title: Match Ending String Patterns --- ## Match Ending String Patterns -This is a stub. Help our community expand it. -This quick style guide will help ensure your pull request gets accepted. +To finish this challenge, it's necessary to use __boundaries__. - +The __$__ Matches end of input. + +For example, /t$/ does not match the "t" in "eater", but does match it in "eat". + + +__important:__ If the multiline flag is set to true, also matches immediately before a line break character. + + + +### Spoiiler Alert: Solution ahead +```javascript +let caboose = "The last car on a train is the caboose"; +let lastRegex = /caboose$/; // Change this line +let result = lastRegex.test(caboose); +```