Explanation of one of the student: (.+) means1 or more of any character \1 means a repetition of what was found in group number1 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

Explanation of one of the student: (.+) means1 or more of any character \1 means a repetition of what was found in group number1

https://code.sololearn.com/cg09m5in8LuK/?ref=app

27th Mar 2018, 11:19 PM
Vučko/Вучко/Vuchko
Vučko/Вучко/Vuchko - avatar
2 Answers
+ 2
Correct, so what is the doubt? Second group (.+) accepts space, if you want match1 as well Regex will be ‘(.+)(.+)\1’
3rd Apr 2018, 4:09 AM
Shashank Bafna
Shashank Bafna - avatar
0
Thank you for this explanation. The way the lesson "explains" is not clear at all. Here's what the lessons says:"a backslash and a number between 1 and 99, e.g., \1 or \17. This matches the expression of the group of that number." Completely impossible to understand, until you explained "\1 means a repetition of what was found in group number 1".
23rd Sep 2020, 5:45 AM
Nassim Abed
Nassim Abed - avatar