# Bug in CMake tutorial

**URL:** https://discourse.cmake.org/t/bug-in-cmake-tutorial/4162
**Category:** Usage
**Created:** [September 29, 2021, 6:47am UTC](https://discourse.cmake.org/t/bug-in-cmake-tutorial/4162 "2021-09-29T06:47:41Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Christophe\_Bernard](https://discourse.cmake.org/user_avatar/discourse.cmake.org/christophe_bernard/32/1828_2.png) [@Christophe\_Bernard](https://discourse.cmake.org/u/Christophe_Bernard)
#### Post date: [September 29, 2021, 6:47am UTC](https://discourse.cmake.org/t/bug-in-cmake-tutorial/4162/1 "2021-09-29T06:47:41Z")

</div>

Hi.

The example tests in Step3 of the CMake tutorial suggest to use the following regexp to verify the output of an executable call.

> do\_test(Tutorial -25 “-25 is [-nan|nan|0]”)

I think this does not what was intended. That matches a single character which is anything until n, or a, or n, etc.

I guess what the documentation writer intended was to write:

> do\_test(Tutorial -25 “-25 is (-nan|nan|0)”)

with parentheses. This matches -nan, nan or 0.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [September 29, 2021, 5:48pm UTC](https://discourse.cmake.org/t/bug-in-cmake-tutorial/4162/2 "2021-09-29T17:48:52Z")

</div>

Thanks! Would you be willing to submit an MR ([instructions](https://gitlab.kitware.com/cmake/cmake/-/blob/master/CONTRIBUTING.rst)) for this?

Cc: @betsy.mcphail

---

<div class="post-metadata">

### Author: ![Christophe\_Bernard](https://discourse.cmake.org/user_avatar/discourse.cmake.org/christophe_bernard/32/1828_2.png) [@Christophe\_Bernard](https://discourse.cmake.org/u/Christophe_Bernard)
#### Post date: [September 29, 2021, 7:07pm UTC](https://discourse.cmake.org/t/bug-in-cmake-tutorial/4162/3 "2021-09-29T19:07:07Z")

</div>

Sure.

---

<div class="post-metadata">

### Author: ![Christophe\_Bernard](https://discourse.cmake.org/user_avatar/discourse.cmake.org/christophe_bernard/32/1828_2.png) [@Christophe\_Bernard](https://discourse.cmake.org/u/Christophe_Bernard)
#### Post date: [September 29, 2021, 7:26pm UTC](https://discourse.cmake.org/t/bug-in-cmake-tutorial/4162/4 "2021-09-29T19:26:39Z")

</div>

The merge request has been submitted. Number 6572.
