You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Step Number: 56
Step Name: steps.withoutNumberCharacter.title
Language: en (and maybe other translations)
Version: v2.29.0
User Agent:
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36'
The description for the 56th example is:
Regex does a greedy match by default. This means that the matchmaking will be as long as possible. Check out the example below. It refers to any match that ends in r and can be any character preceded by it. But it does not stop at the first letter r.
However, the last sentence indicates that the RE does not stop at the first r while it should say it doesn't stop at the first e, confirming that the RE is greedy by default. The correct description would be:
Regex does a greedy match by default. This means that the matchmaking will be as long as possible. Check out the example below. It refers to any match that ends in r and can be any character preceded by it. But it does not stop at the first letter.
Alternatively this issue can be solved by changing the examples.
The text was updated successfully, but these errors were encountered:
I understand the confusion from the description, but the text does mean what it says.
The greedy match /.*r/ will find the match that ends in the character 'r'. Thus, the greedy match is going until it finds the last 'r' in the text, in this case at the end. The confusion likely comes from the regular expression treating ber beer beeer beeeer as one occurrence, when we would normally want it to stop by word.
Do you think that a description like this would be clearer?
Regex does a greedy match by default, matching the longest possible subset. In this example, it refers to any match that ends in 'r', with any number of any characters preceding it. Since these character can include spaces and even the character 'r', the match extends to the final 'r' in the text.
Step Number: 56
Step Name: steps.withoutNumberCharacter.title
Language: en (and maybe other translations)
Version: v2.29.0
User Agent:
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36'
The description for the 56th example is:
However, the last sentence indicates that the RE does not stop at the first
r
while it should say it doesn't stop at the firste
, confirming that the RE is greedy by default. The correct description would be:Alternatively this issue can be solved by changing the examples.
The text was updated successfully, but these errors were encountered: