Hello everyone. The eighth slide in the Advanced Regular Expression mission got me all confused. Can someone explain how the pattern provided by the answer matches the expected? I used a different pattern, that achieved the same result, but for me, the provided answer makes no sense.
The code: (pattern 1 is provided by DQ’s answer)
How I made my pattern:
Using the same tool with the provided pattern:
Thanks in advance =)
Edit: The site I used for testing the regex is https://regex101.com/
Edit 2: Actually I thought it would work, lol. I got this error, which is odd, since the ‘top_domains’ variable uses ‘domains’ and it is correct.