Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

What is the answer to practice number 2? (REGEX)

Match:

34522 72379 Exclude:

1234k 5784k 5784k

Steven Parker
Steven Parker
231,007 Points

To facilitate a specific answer, please provide a link to the course page.

1 Answer

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

Hi Armen,

Instead of telling you the answer (partly because I struggle to answer it from the top of my head) I wonder if you know of any places out there on the web that might help you work it out.

I don't know if I speak for many others but I don't think few of us can actually memorise all the rules of Regex. I'm sure to could with lots of practice but instead I would encourage you to go on Google and search for something like "JS regex cheatsheets".

In spite of the name, it's not cheating. You'll be making these sorts of searches all the time in your programming career.

So look for what you need to match 2 sets of 5 digit numbers and how to exclude characters as well.

Thats great feedback thank you!