Change:
Affected page Your code The callback url is redacted. Expected behavior I expected this code to pass the tests. But it did not. System (please complete the following information): Device: [Laptop] OS: [Ubuntu 20.4] Browser: [Opera] Version: [77] Additional context The third test didn't pass. So, I ran FCC on my local computer and checked the tests on the page. The first regex test is as follows: The regex won't pass if is on a new line because matches all characters except for the new line. When I replaced with the tests passed. So I think we should change this test to the following: My reasoning is that the correctness of a solution should not depend on formatting. Especially when the formatting is not something very abnormal.
Hello there, Thank you, for taking the time to open this. In general, we need to find a better way of testing these challenges without using RegEx, as mentioned in As for this issue, a quick-fix could be as you mentioned, but, I might even just make the test to use the flag: An issue with the help wanted or first timers only label is open for contribution. The first comprehensive PR created will be reviewed and merged. We typically do not assign issues to anyone other than long-time contributors. If you would like to contribute, and have not read the contributors docs, please do so here: If you have any issues with contributing, be sure to join us on the , or on the
Hello, Can I do this? I understand that I just need to change to this , right? I just didn't get this part: "make the test to use the s flag".
Hey . Thank you, for your interest in contributing. The issue with the current test RegEx is the does not match new lines. In JavaScript RegEx, there is an which allows to match new lines. Hope this clarifies
Yes, thank you I've another question, the only way to try these regex tests is by passing the url with the code as if you were someone trying to do the challenge, or does freeCodeCamp makes specific tests for this? Like tests to try the challenge test or something like that.
Unfortunately, we currently have nothing to help test the backend content - you will need to have the project and code, and build freeCodeCamp locally with the changes to test. Do remember, this section of the curriculum links all the code needed to pass the current tests.
OK, I'll see if a can give it a try, then! Thank you :)
Hey so I tried it out and the test actually passed without needing to modify anything! I made a deploy in Heroku: https://aileen- Based on this for the challenge. I just modified some files in the repo to see that the first tests of the challenge pass (i.e. try the previous heroku url ) Then skipped some steps and go ahead to modify the part of code that alirezaghey said that wasn't passing the tests. I tried with both codes: the one provided by the and the one provided by alirezaghey and it worked just fine. The file with the code that is being tested is right , as you would see is the same code provided in this issue. Here's a screenshot of the results. <img width="858" alt="Screen Shot 2021-06-24 at 7 24 31 PM" src="https://user-"Supposing I didn't miss anything, I would say that maybe it was a different problem that causes the regex to fail. I'll see if I can try it on Opera browser. I have this config: Device: [Laptop] OS: [Mac OS 10.14.6] Browser: [Chrome] Version: [91]
Hi Are you sure you haven't a false positive produced by the ? Neither of the regexes can differentiate between commented and uncommented code.
You're totally right, I completely forgot about that, sorry. I deleted the commented code and now the test is not passing. Tomorrow will be trying the fix both of you suggested. Thank you for your response!

Discussion:
(data) => { assert.match( data, <del> /passport.use.*new GitHubStrategy/gi, </del> <ins> /passport.use.*new GitHubStrategy/gis, </ins> 'Passport should use a new GitHubStrategy' ); assert.match(