Skip to content
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

3-6-3-crazy-regex. There is a mistake in the branch 'completed'. #163

Open
obaibula opened this issue Mar 30, 2023 · 0 comments
Open

3-6-3-crazy-regex. There is a mistake in the branch 'completed'. #163

obaibula opened this issue Mar 30, 2023 · 0 comments

Comments

@obaibula
Copy link

I refer to the findLastWord() and findFirstWord() methods.

If you add the string " ........." to the end of the note.txt file like this, the regex from the branch "completed" won't pass the tests, which is "\w+$".

As far as I am concerned, we should use something like "\w+(?=\W*$)" instead.

Please, let me know If I am mistaken here.

@shryhus shryhus added this to To do in Java Fundamentals Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant