grep -P '\d+' file.txt

Category: Text Processing

grep -P '\d+' file.txt

Use Perl-compatible regex for matching

Uses Perl-compatible regular expressions — the most powerful type, supporting advanced patterns like \\d for any digit.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.