freeCodeCamp/guide/chinese/certifications/javascript-algorithms-and-d.../regular-expressions/match-anything-with-wildcar.../index.md

561 B
Raw Blame History

title localeTitle
Match Anything with Wildcard Period 匹配通配符期间的任何内容

匹配通配符期间的任何内容

提示1

.是这一挑战的关键。

提示2

你应该把点放在正确的位置。

let exampleStr = "Let's have fun with regular expressions!"; 
 let unRegex = /.un/; // Change this line 
 let result = unRegex.test(exampleStr); 

这段时期.将是任何一个字符因此字符串“run”“sun”“fun”和“pun”具有相同的un charaters。