<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/78066>78066</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            FileCheck regex should support common regex escape sequences
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            testing-tools
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          cjdb
      </td>
    </tr>
</table>

<pre>
    `clang\d` is a pattern that's recognised by many regex engines to mean `clang[0-9]`, but FileCheck doesn't seem to recognise it. It would be good to have FileCheck recognise the following patterns:

* `\f`, `\n`, `\r`, `\t`, `\v`: usual escape sequences

* `\b`: matches a word boundary
* `\d`: equivalent to `[0-9]`
* `\s`: equivalent to `[ \f\n\r\t\v]`
* `\w`: equivalent to `[A-Za-z0-9_]`

* `\B`: inverse of `\b`
* `\S`: inverse of `\s`
* `\D`: inverse of `\d`
* `\W`: inverse of `\w`

The above are good for matching ASCII characters, but don't scale for anything that's outside of ASCII. If we're to add this feature, I think it would be good to produce a design that incorporates Unicode code points as well.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VE2P4zYM_TXyhUggy_k8-JDNIEDO26JALwUt0bZ2ZckryknTX1_Im9mZCTJ7scHkvUc-miQy284T1WL9RaxfCpxSH2Ktv5mmaIK51WIjtUPfifXRiI0Ey4AwYkoUPaQek1Bbhkg6dN4yGWhuMKC_QaSO_gXynfXEkAIMhB7e5L7IxV6sX8RGCnWEZkpwso6OPenvYAKxF2qbgImGTP6VAGxawjnBNUzOQEPQhWAyoscLvZN4I6SeoA3Ohav13WvpLKqDkC9Cvj7VIdcm1sf2XtHPyH-I4ocofYgu-VUdYOIJHRBrHAmYfkzkNfHzXM2dM2DSPeXOXkM00ITJG4y3R7i5w-nHZC_oyKdsfP7vXTcfSPwbEsx-s8vsLTvKPp7KXH8jc1j8jYv_5GL_zwfug8KXu4L1F4pMENr3XXgAf_0MzE_AL5-BzRPwX5-Brw-V_9ETYBMuBBjvY9aG-PNb5Uk6fD2ez6B7jKgTRX4dYxPuo6vR0UxBf0sz5de-hCmxNXPyWWYJ5xauJNQ2Uu4rGgOptwwtYZoiZe1z_sV_B_tk-McYzKQJEAzlhZ4zgfU6xDFETMTwp7c6GIL5MQbrEwMyXMm5ZWHqyuyrPRZUl1u5LnflZrMr-rrZVeVWbjfNCnEtS0mayGzLVVliK7FVha2VVCtZlpUqq5XaLff7ltZ6L6uqUUprJVaSBrRu6dxlWIbYFZZ5onq7k5tN4bAhx_PxUSoRJ-u7RQrBsVAq36NYZ96imToWK-ksJ35TSjY5qt_vfD453M_d4WkcQ0ygwzAE_3qOHtaymKKr-5TG-R6ok1CnzqZ-apY6DEKdcqr7azHG8I10Euo0O2ChTrOJ_wMAAP__S9WWYw">