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.
- Prepare
- Linux Shell
- Grep Sed Awk
- 'Grep' - B
- Discussions
'Grep' - B
'Grep' - B
Sort by
recency
|
87 Discussions
|
Please Login in order to post a comment
there could be zero or one space between the repeated numbers...
I don't know why 9999 5628 9201 1232 shouldn't be in the output. I guess the test has some part wrong.
On my system (Ubuntu 20.04 with GNU grep 3.4 the following simpler command works as well:
grep -E "([0-9]) ?\1"
I don't understand why it doesn't work here.grep "\(\d\)\s?\1"
grep '\([0-9]\)[[:space:]]*\1'