2.3 KiB
2.3 KiB
id, title, localeTitle, challengeType
id | title | localeTitle | challengeType |
---|---|---|---|
587d7db8367417b2b2512ba2 | Restrict Possible Usernames | Restringir posibles nombres de usuario | 1 |
Description
Instructions
userCheck
para que se ajuste a las restricciones enumeradas anteriormente.
Tests
tests:
- text: Tu expresión regular debe coincidir con <code>JACK</code>
testString: 'assert(userCheck.test("JACK"), "Your regex should match <code>JACK</code>");'
- text: Tu expresión regular no debe coincidir con <code>J</code>
testString: 'assert(!userCheck.test("J"), "Your regex should not match <code>J</code>");'
- text: Tu expresión regular debe coincidir con <code>Oceans11</code>
testString: 'assert(userCheck.test("Oceans11"), "Your regex should match <code>Oceans11</code>");'
- text: Tu expresión regular debe coincidir con <code>RegexGuru</code>
testString: 'assert(userCheck.test("RegexGuru"), "Your regex should match <code>RegexGuru</code>");'
- text: Su expresión regular no debe coincidir con <code>007</code>
testString: 'assert(!userCheck.test("007"), "Your regex should not match <code>007</code>");'
- text: Tu expresión regular no debe coincidir con <code>9</code>
testString: 'assert(!userCheck.test("9"), "Your regex should not match <code>9</code>");'
Challenge Seed
let username = "JackOfAllTrades";
let userCheck = /change/; // Change this line
let result = userCheck.test(username);
Solution
// solution required