V10 / 66cebf3528e0
RegexPatterns.cs
Lilith/Core/Extensions/RegexPatterns.cs
Unchanged from the preceding versionCS
using System.Text.RegularExpressions;
namespace Lilith.Core.Extensions;
/// <summary>Shared fixed patterns compiled by the regex source generator.</summary>
public static partial class RegexPatterns
{
[GeneratedRegex(@"\S+")]
public static partial Regex Words();
[GeneratedRegex(@"\s+")]
public static partial Regex Whitespace();
[GeneratedRegex(@"Version\s+\d+", RegexOptions.IgnoreCase)]
public static partial Regex VersionLabel();
[GeneratedRegex(@"^\s*[#\s]*\d+(?:\.\d+)?%\s*$")]
public static partial Regex InstallerProgress();
[GeneratedRegex(@"\x1b\[[0-?]*[ -/]*[@-~]")]
public static partial Regex AnsiEscape();
[GeneratedRegex(@"(?<![\d.])(\d+(?:\.\d+)?)%")]
public static partial Regex DownloadPercentage();
[GeneratedRegex(@"^[A-Za-z0-9][A-Za-z0-9._:/@-]*$")]
public static partial Regex ModelIdentifier();
[GeneratedRegex(@"^[A-Za-z0-9][A-Za-z0-9._:/-]*$")]
public static partial Regex OllamaModelIdentifier();
}