From ed65e0950c649554a2693fa8cffe7feb1debac75 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Tue, 5 Sep 2023 21:37:59 +0800 Subject: [PATCH] Use verbatim string. --- .../IO/Serialization/Converters/RomajiTagConverter.cs | 2 +- .../IO/Serialization/Converters/RubyTagConverter.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/RomajiTagConverter.cs b/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/RomajiTagConverter.cs index ddbff740f..508d16f3a 100644 --- a/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/RomajiTagConverter.cs +++ b/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/RomajiTagConverter.cs @@ -20,7 +20,7 @@ public override RomajiTag ReadJson(JsonReader reader, Type objectType, RomajiTag if (string.IsNullOrEmpty(value)) return new RomajiTag(); - var regex = new Regex("\\[(?[-0-9]+)(?:,(?[-0-9]+))?\\]:(?.*$)"); + var regex = new Regex(@"\[(?[-0-9]+)(?:,(?[-0-9]+))?\]:(?.*$)"); var result = regex.Match(value); if (!result.Success) return new RomajiTag(); diff --git a/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/RubyTagConverter.cs b/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/RubyTagConverter.cs index 69fc0ec20..5d8f98606 100644 --- a/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/RubyTagConverter.cs +++ b/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/RubyTagConverter.cs @@ -20,7 +20,7 @@ public override RubyTag ReadJson(JsonReader reader, Type objectType, RubyTag? ex if (string.IsNullOrEmpty(value)) return new RubyTag(); - var regex = new Regex("\\[(?[-0-9]+)(?:,(?[-0-9]+))?\\]:(?.*$)"); + var regex = new Regex(@"\[(?[-0-9]+)(?:,(?[-0-9]+))?\]:(?.*$)"); var result = regex.Match(value); if (!result.Success) return new RubyTag();