Possibly teach parentheses `()` for grouping
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- markdown
- Ambito
- documentation
Direzione di ricerca
Start by reading episode 1's regular expressions lesson and its Matching Dates exercises; episode 2's phone number challenges show where escaped parentheses are used. Decide how to introduce grouping parentheses and add a related exercise with its solution. Done when the lesson explains the feature and the exercise demonstrates it.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Currently the lesson doesn't teach parentheses for grouping parts of the regular expression. I think it would be worth adding this to the metacharacters taught in episode 1 because:
- They are commonly used in building regular expressions
- The introduction about regular expressions says regex can be used for the following things that parentheses supports:
* Match patterns that repeat any number of times.
* Capture the parts of the original string that match your pattern.
- In episode 2, when searching for the phone number with area code given in parentheses, the solution says "
\(escape character with the parenthesis as straightforward character match", but parentheses have not been presented as a special character in the lesson, so the need to escape them has not been pointed out.
If added to the content in episode 1, some options for adding the () into exercises:
- Exercise
Matching Dates: "How would you match the date format dd-MM-yyyy?" could have a follow up of how to match that same pattern with a regular expression that includes parentheses, with a solution of\b(\d{2}-){2}\d{4}\b - After the
Matching Datesexercise, add one that would match both the pattern dd-MM-yyyy and MM-yyyy, with a solution of\b(\d{2}-){1,2}\d{4}\b. - Exercise
Matching multiple date formats: How would you match the date format dd-MM-yyyy or dd-MM-yy at the end of a line only? could give a solution in place of the current one that eliminates matching a 3 digit year as is currently given such as\b\d{2}-\d{2}-\d{2}(\d{2})?\b. - After the phone number related challenges in episode 2, add another that asks for a regex that matches both formats of phone numbers (with/without country code and area code given in parentheses or with dash) with a solution somewhere along the lines of
(\+\d{1,3} ?|1-)?(\(\d{3}\)\s?|\d{3}-)\d{3}-\d{4}
If adding about the use of parentheses in regex is desired by others, I don't mind contributing this and integrating one (or more) of the exercise options suggested above (or some other exercise you want to suggest).
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 36
- Fork
- 84
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di LibraryCarpentry/lc-data-intro
-
Incorrect solution in a couple of exercises.Forse già presa @3kori l’ha presa 76 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
-
Lesson title changeForse di nuovo libera @Freddy2304 l’ha presa 751 giorni fa e non c’è nessuna pull request aperta. Aperta
LibraryCarpentry/lc-data-intro#240 · 7 commenti · 1 reazione · 2 assegnatari ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 40/100
LibraryCarpentry/lc-data-intro#226 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 38/100
LibraryCarpentry/lc-data-intro#225 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
LibraryCarpentry/lc-data-intro#221 · 1 commento ·
Tutte le issue di LibraryCarpentry/lc-data-intro
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 76/100
416rehman/Guardrails#1716 ·
-
Ep2: source of metadata?Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 72/100
-
area:kubernetes area:security documentation priority:medium size:small
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
RonaldHensbergen/composable-data-stack#1339 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
hugomrdias/playwright-test#786 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno