Предполагается, что пространство имен XAML sys
для системы:
xmlns:sys="clr-namespace:System;assembly=mscorlib"
Тогда:
<Application.Resources>
<ResourceDictionary>
<sys:String x:Key="EmailPattern">... some regex patterm ...</sys:String>
</ResourceDictionary>
</Application.Resources>
Использование:
if (Application.Current.Resources.TryGetValue("EmailPattern", out object regexPattern))
{
Console.WriteLine(regexPattern);
}