> For the complete documentation index, see [llms.txt](https://freebsdfrau.gitbook.io/serious-shell-programming/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://freebsdfrau.gitbook.io/serious-shell-programming/basics/regex.md).

# Regex

While most will gravitate toward `grep` to use regular expressions, the more efficient method is to use `awk`. Even more efficient is to use built-in *test* (`[`) when more full regular expressions are not required. All these methods can be made portable, but we will look at examples of inefficiencies and explore solutions.
