mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 23:58:31 -06:00
tests allow for pages to be stored and retrieved
This commit is contained in:
20
Management/Models/Local/MarkdownUtils.cs
Normal file
20
Management/Models/Local/MarkdownUtils.cs
Normal 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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user