freeCodeCamp / CurriculumExpansion

Creative Commons Attribution Share Alike 4.0 International
315 stars 105 forks source link

feat: add regex lab #505

Closed Dario-DC closed 2 months ago

Dario-DC commented 3 months ago

Checklist:

Closes ####

image

moT01 commented 3 months ago

Is this one ready?

zairahira commented 3 months ago

@Dario-DC I am not sure if matchAll has been taught yet. I see match in the sheet. I would suggest to include matchAll in the lecture videos and keep this project as it is quite appropriate for this lab.

The same goes for replaceAll, I couldn't find it in the sheet.

Dario-DC commented 3 months ago

@Dario-DC I am not sure if matchAll has been taught yet. I see match in the sheet. I would suggest to include matchAll in the lecture videos and keep this project as it is quite appropriate for this lab.

The same goes for replaceAll, I couldn't find it in the sheet.

They've been added to the lecture scripts.

Dario-DC commented 2 months ago

I had the same doubts. I'll try to come up with something else that require campers to write regular expressions.

Do you think this could be used in any other sections of the curriculum? @moT01

Dario-DC commented 2 months ago

Some time ago Zaira suggested to code a tool that scans a markdown file and extracts every link. This could be an idea. The markdown could be provided as a string in the seed code. What do you think? @moT01

Another option would be a password strength checker.

moT01 commented 2 months ago

Do you think this could be used in any other sections of the curriculum?

Probably. There's a number of things it covers. Any thoughts @jdwilkin4?

a tool that scans a markdown file and extracts every link

That's not bad, but I think you might only need to write one regex for that. Which works. But maybe something where they need to write several. I asked GPT for a list of ideas, here's a few that sound pretty decent:

Log File Analyzer: Create a script that parses a log file and extracts information like IP addresses, dates, or error messages using regex.

Simple Markdown Parser: Build a basic parser that converts simple markdown (like bold, italic, and # heading) into HTML using regex.

Password Strength Indicator: Create a password strength meter that evaluates a password based on criteria like the presence of uppercase letters, numbers, special characters, etc., using regex.

Form Validator: Create a form with fields like email, phone number, and zip code. Use regex to validate the input before submission.

I like the first two.

Dario-DC commented 2 months ago

That's not bad, but I think you might only need to write one regex for that.

That's true. I like the markdown parser. I'll update this PR as soon as I have something that works.

The form validator would be for another lab.

jdwilkin4 commented 2 months ago

I like the idea of keeping this project in the regex module but just after this new lab you will be adding. So I updated the sheet to show this

Screenshot 2024-08-23 at 7 03 48 AM
moT01 commented 2 months ago

So we will need to update the order of the blocks on there as well as in the repo. I will see if I can come up with a script to update the repo.