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 solve that without a regular expression using ordinary string functions which are provided by most of the prog languages. For example one solution in Python. Add a comma at the start and the end:

```
s=", 18, 34, 22, 9, 2, 56,"
s.find(', 2,')

```

In case the search string can't be found the function returns -1. In case you insist on a regexp the pattern could look the same.