We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
\1 refers to the what was found within the first capture group. Capture groups are groups incased inside parentheses >>()<<
In the context of >> grep -P '([0-9]) ?\1' << the \1 would mean whatever was found within the ([0-9]). This would satisfy the "duplicate" portion of the problem.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
'Grep' - B
You are viewing a single comment's thread. Return to all comments →
\1 refers to the what was found within the first capture group. Capture groups are groups incased inside parentheses >>()<<
In the context of >> grep -P '([0-9]) ?\1' << the \1 would mean whatever was found within the ([0-9]). This would satisfy the "duplicate" portion of the problem.