-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[290-p4] Q6 & Q7 understanding #66
Comments
Dear @ymzhang-neo, I can't think of any reason I'd add that quantifier. My guess is I took some previous regular expression I was working with and modified it and didn't think to remove the quantifier. I can't think of a reason to include it now. I think the best way is to make very similar examples and add them to the grep section in the book! I'll work on some and push them out. Thank you for providing the specific attempts, it's very helpful! |
Thank you @kevinamstutz for the clarification! I asked about the quantifiers just to make sure that I did not miss something. As to the additional examples, they would be helpful to illustrate regex in action - Thanks so much for drafting them! |
With Project 4 deadline on yesterday, I think we can close this issue. Thanks! |
Hi @kevinamstutz , this will be one of the last two posts about 290 Project 4. The two posts will be about my understanding of the code: The questions are well designed, and it's just about my misunderstanding of the code. Thanks in advance for helping me to learn!
Q6 is to identify dialogue directions enclosed in
"["
and"]"
. and Q7 is about identifying multiple directions in one line. The solution says:It seems that the pattern
"\\[.*\\]"
will get the same results as"(\\[.*\\])+"
in the Q6 solution. Is it a general recommendation/good practice to use quantifier. or is there some important difference that I may neglect?I would also like to share three mistakes I made about Q7, which motivated me to suggest more notes or hints on, for example, the parentheses and quantifiers.
I am not sure how to best help the students to learn such details. While I can compare my code with the solution, it could be difficult to debug such mistakes on the students' side as manually checking the data may or may not reveal all the patterns. Do you think there are any online resources or examples that may be relevant to be included in the project?
The text was updated successfully, but these errors were encountered: