Regular expressions are a very powerful concept but rather hard to explain from scratch.
If you don't know how to use them, you might have some luck with the unix man pages for ed , egrep , vi , or regex . If not, ask someone, or get any one of a number of books including the O'Reilly and Associates Sed and Awk book. The following should given an idea of how they work. Kind of silly, but it is just to demonstrate. As with a string, a regular expression in a numeric context gets converted to an integer, which will always be zero.