I fixed your titles so they were actually meaning something. It would be great – if you post a question – to make your title really specific about what you want to do, not "Unix grep". – slhck♦Oct 4 '11 at 7:52
.. how does this work ? – ricedragonOct 4 '11 at 3:08
@ricedragon it's regex notation. [abc] means a or b or c. $ means match end of line. play with regex coach and see regular-expressions.info and grep -P is a bit more flexible. – barlopOct 4 '11 at 4:04