Regex help Quality Assurance and Testing

    test('#match, #notMatch', function () {
      const regex = /^#\sname\:\s[\w\s]+,\sage\:\s\d+\s?$/;
      assert.notMatch(formatPeople('John Doe', 35), regex);
      assert.notMatch(formatPeople('Paul Smith III', 'twenty-four'), regex);

I can not find a reference for what the # character does in the Regex for this example.

Can you point me in the direction that documents this?

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0

Challenge: Use Regular Expressions to Test a String

Link to the challenge:

never mind. I see that it is coming from the

 const formatPeople = function (name, age) {
    return '# name: ' + name + ', age: ' + age + '\n';

function. :grinning:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.