Code
·
27 lines
·
822 bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27using System.Text.RegularExpressions;
namespace Eml2MimePart;
public partial class RegexHelper
{
public static readonly Regex IsValue = IsValueRegex();
public static readonly Regex Boundary = BoundaryRegex();
public static readonly Regex CharSet = CharsetRegex();
public static readonly Regex FileName = FileNameRegex();
public static readonly Regex ContentId = ContentIdRegex();
[GeneratedRegex(@"^\W")]
private static partial Regex IsValueRegex();
[GeneratedRegex(@"\Wboundary=""([^""]*)""")]
private static partial Regex BoundaryRegex();
[GeneratedRegex(@"\Wcharset=""([^""]*)""")]
private static partial Regex CharsetRegex();
[GeneratedRegex(@"\Wname=""([^""]+)""")]
private static partial Regex FileNameRegex();
[GeneratedRegex(@"<([^>]+)>")]
private static partial Regex ContentIdRegex();
}