Use plus sign "+" in regex for matching the subset of combinations including a pattern. For example to match a number multiple digits in a file: grep "[0-9]\+" file.txt