< Previous | Contents | Next >
Summing Up
In this chapter, we’ve seen a few of the many uses of regular expressions. We can find even more if we use regular expressions to search for additional applications that use them. We can do that by searching the man pages:
[me@linuxbox ~]$ cd /usr/share/man/man1
[me@linuxbox man1]$ zgrep -El 'regex|regular expression' *.gz
[me@linuxbox ~]$ cd /usr/share/man/man1
[me@linuxbox man1]$ zgrep -El 'regex|regular expression' *.gz
The zgrep program provides a front end for grep, allowing it to read compressed files. In our example, we search the compressed section one man page files in their usual loca- tion. The result of this command is a list of files containing either the string “regex” or “regular expression”. As we can see, regular expressions show up in a lot of programs.
There is one feature found in basic regular expressions that we did not cover. Called back references, this feature will be discussed in the next chapter.