[^x] "end of" will be confused with ^x regex that mean at "start of", the inverse.
Hi,
The ^ "endof" operator will be confused with the regex ^ "startof" operator. Consider an expression like "^word[^0]" that will mean "something that start with the end of..." (and it's a simple example, I guess some regex experts can find something more crazy). This is absolute confusing. Please consider use standards meanings when introducing semantics, not the inverse meaning. Should be better to use $ for last index, like in regex, like word[0$].
Regards
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: a94537c5-754e-9dea-94a8-7573011f588c
- Version Independent ID: aba09118-22c5-2c6a-954a-b9659a9644ae
- Content: What's New in C# 8.0 - C# Guide
- Content Source: docs/csharp/whats-new/csharp-8.md
- Product: dotnet-csharp
- GitHub Login: @BillWagner
- Microsoft Alias: wiwagn
Thanks for the feedback @obewan
This has already been decided, and won't be changed. Among other considerations, the $ token is used for a string interpolation expression.
The article correctly describes the current behavior.
As you encounter other language design considerations, you should post those issues on the dotnet/csharplang repo. That's where language design discussions take place.