question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug - Regex: Check Grouping of Characters

See original GitHub issue

Describe your problem and how to reproduce it: I’m on the Regular Expressions: Check For Mixed Grouping of Characters. I was able to pass this checkpoint with a solution that doesn’t meet the objectives of the assignment. I used the following code:

let myString = "Eleanor Roosevelt";
let myRegex = /(Franklin|Eleanor)? Roosevelt/; // Change this line
let result = myRegex.test(myString); // Change this line

With this code I match just “Roosevelt” which is only part of the name(s), yet I still pass the assignment.

Add a Link to the page with the problem: With this code I match just “Roosevelt” which is only part of the name(s) we are supposed to match for this assignment, yet I still pass the assignment.

Tell us about your browser and operating system:

  • Browser Name: Chrome
  • Browser Version: Version 79.0.3945.117 (Official Build) (64-bit)
  • Operating System: Windows 10 pro

If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box):

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
AshNaz87commented, Jan 21, 2020

@ojeytonwilliams Would like to have a crack at this

0reactions
AshNaz87commented, Jan 21, 2020

@ojeytonwilliams Had a go

Please see #38097

Read more comments on GitHub >

github_iconTop Results From Across the Web

Possible bug for "Regular Expressions: Check For Mixed ...
Possible bug for "Regular Expressions: Check For Mixed Grouping of Characters" · It asks for Franklin Roosevelt but then after running it changes ......
Read more >
Regular Expressions - Check For Mixed Grouping of Characters
In this regular expressions tutorial we check for mixed grouping of characters. We're using regular expressions in conjunction with ...
Read more >
Capturing Groups and Backreferences
Feature Syntax JGsoft.NET Java Perl PCRE PCRE2 PHP Delphi R Capturing group (regex) YES YES YES YES YES YES YES YES YES Capturing group \(regex\)...
Read more >
Regex for checking that at least 3 of 4 different character ...
It's easy enough to check if they are existant or not ---but at least 3? at least eight (8) characters. At least three...
Read more >
Capturing groups - The Modern JavaScript Tutorial
Parentheses group characters together, so (go)+ means go ... The method str.match(regexp) , if regexp has no flag g , looks for the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found