APPENDIX C Regular Expressions

The POSIX specification defines two kinds of regular expressions: basic regular expressions, such as those used by historic sed and grep, and extended regular expressions, used by awk (and egrep). There are other kinds, but these two form the basis of what you need to know. While some documentation describes basic regular expressions as "obsolete," they are still in widespread use. (However, if you are developing software, please use extended regular expressions.)

This appendix is also significant because the shell pattern matching function (see Appendix A for the complete shell specification) is defined in terms of section 9.3.5, "RE Bracket Expression."

Note All external documents referenced in this appendix ...

Get Beginning Portable Shell Scripting: From Novice to Professional now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.