Skip to content

Commit

Permalink
Use verbatim string.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Sep 5, 2023
1 parent c60ec3b commit ed65e09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public override RomajiTag ReadJson(JsonReader reader, Type objectType, RomajiTag
if (string.IsNullOrEmpty(value))
return new RomajiTag();

var regex = new Regex("\\[(?<start>[-0-9]+)(?:,(?<end>[-0-9]+))?\\]:(?<romaji>.*$)");
var regex = new Regex(@"\[(?<start>[-0-9]+)(?:,(?<end>[-0-9]+))?\]:(?<romaji>.*$)");
var result = regex.Match(value);
if (!result.Success)
return new RomajiTag();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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("\\[(?<start>[-0-9]+)(?:,(?<end>[-0-9]+))?\\]:(?<ruby>.*$)");
var regex = new Regex(@"\[(?<start>[-0-9]+)(?:,(?<end>[-0-9]+))?\]:(?<ruby>.*$)");
var result = regex.Match(value);
if (!result.Success)
return new RubyTag();
Expand Down

0 comments on commit ed65e09

Please sign in to comment.