**Describe the bug** With this C# code the method is not recognized correctly ```C# namespace Sample.NS { public class MyClass { Regex pattern = new(@".$"); public void Fu() { } } } ``` **Expected behavior** In `readme.md` I need to use `@ref Sample.NS.MyClass.Fu` as a reference **To Reproduce** [DoxygenSample.zip](https://github.com/doxygen/doxygen/files/10701220/DoxygenSample.zip) In this sample the method before the `".$"` string is recognized, but the second method after it is not. **Version** doxygen 1.9.6 has this issue