I want to search all '2' s in the string below:
2, 10,11,1,1, 22,1,12,1,1, 1,2 , 2 ,2
I gave regular expression:
(^\s*(2)\s*)|(\s*,\s*(2)\s*(,|$))
But it will not search last but one 2.
I changed regular expression now as,
(^\s*(2)\s*)|(\s*,\s*(2)\s*)
But now it will take one of the 2s in 22.
How can I change the regular expression so that I find all the 2s (22 or 12 should not be considered)?