tests allow for pages to be stored and retrieved

This commit is contained in:
2024-01-12 13:34:42 -07:00
parent 1eda91eeb0
commit a4179e6d52
13 changed files with 279 additions and 34 deletions

View File

@@ -0,0 +1,20 @@
using System.Text.RegularExpressions;
namespace LocalModels;
public static class MarkdownUtils
{
public static string ExtractLabelValue(string input, string label)
{
string pattern = $@"{label}: (.*?)\n";
Match match = Regex.Match(input, pattern);
if (match.Success)
{
return match.Groups[1].Value;
}
return string.Empty;
}
}