TYPO-FIX JS-regex-match-non-whitespace-characters (#38407)
Added Markdown to correctly display second testpull/38412/head
parent
88e1952478
commit
6920634e6c
|
@ -30,7 +30,7 @@ Change the regex <code>countNonWhiteSpace</code> to look for multiple non-whites
|
|||
tests:
|
||||
- text: Your regex should use the global flag.
|
||||
testString: assert(countNonWhiteSpace.global);
|
||||
- text: Your regex should use the shorthand character <code>\S/code> to match all non-whitespace characters.
|
||||
- text: Your regex should use the shorthand character <code>\S</code> to match all non-whitespace characters.
|
||||
testString: assert(/\\S/.test(countNonWhiteSpace.source));
|
||||
- text: Your regex should find 35 non-spaces in <code>"Men are from Mars and women are from Venus."</code>
|
||||
testString: assert("Men are from Mars and women are from Venus.".match(countNonWhiteSpace).length == 35);
|
||||
|
|
Loading…
Reference in New Issue