We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2cc4911 commit 3e7b27eCopy full SHA for 3e7b27e
SoundSwitch.Common/Framework/Audio/Device/DeviceInfo.cs
@@ -7,9 +7,9 @@ namespace SoundSwitch.Common.Framework.Audio.Device
7
{
8
public class DeviceInfo : IEquatable<DeviceInfo>
9
10
- private static readonly Regex NameSplitterRegex = new Regex(@"(?<friendlyName>[\w\s-_\.\/\\]+)\s\([\d\s\-|]*(?<deviceName>.+)\)", RegexOptions.Compiled);
+ private static readonly Regex NameSplitterRegex = new(@"(?<friendlyName>.+)\s\([\d\s\-|]*(?<deviceName>.+)\)", RegexOptions.Compiled);
11
12
- private static readonly Regex NameCleanerRegex = new Regex(@"^\d+\s?-\s?", RegexOptions.Compiled | RegexOptions.Singleline);
+ private static readonly Regex NameCleanerRegex = new(@"\s?\(\d\)|^\d+\s?-\s?", RegexOptions.Compiled | RegexOptions.Singleline);
13
14
private string _nameClean;
15
0 commit comments