Question: I have some comma separated numbers in a string out of which I want to match a specific number. For the example string "18, 34, 22, 9, 2, 56" I want to match the number "2" but not the two "2s" in 22. How can I obtain that?

Answer: 
use this regular expression `\b2\b` replace `2` with your value
you can use grep

```
echo "18, 34, 22, 9, 2, 56" | grep -E -o "^2,| 2,| 2$"

```

and substitute '2' in grep regex by any number you search in your comma separated numbers string