HackerRank - 'Grep' - B
April - 25/2025Problem:
N credit card numbers. Assume that the credit card numbers will have 4 space separated segments with 4 digits each.
# Input
- 1234 5678 9101 1234
- 2999 5178 9101 2234
- 9999 5628 9201 1232
- 8482 3678 9102 1232
# Output
- 1234 5678 9101 1234
- 2999 5178 9101 2234
- 9999 5628 9201 1232
# Solution
grep '\(\d\)\s*\1'