In Visual Studio 2022 we can do this by prefixing a raw or literal string with /*lang=regex*/
/*lang=regex*/
/*lang=regex*/@"^HF/B\d$"