forked from Taritsyn/JavaScriptEngineSwitcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommonRegExps.cs
More file actions
24 lines (22 loc) · 760 Bytes
/
CommonRegExps.cs
File metadata and controls
24 lines (22 loc) · 760 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
namespace JavaScriptEngineSwitcher.Core.Helpers
{
/// <summary>
/// Common regular expressions
/// </summary>
public static class CommonRegExps
{
/// <summary>
/// Pattern for working with JS names
/// </summary>
public static readonly string JsNamePattern = @"[$_\p{Lu}\p{Ll}\p{Lt}\p{Lm}\p{Lo}\p{Nl}]" +
@"[$_\p{Lu}\p{Ll}\p{Lt}\p{Lm}\p{Lo}\p{Nl}\u200C\u200D\p{Mn}\p{Mc}\p{Nd}\p{Pc}]*";
/// <summary>
/// Pattern for working with JS full names
/// </summary>
public static readonly string JsFullNamePattern = JsNamePattern + @"(?:\." + JsNamePattern + @")*";
/// <summary>
/// Pattern for working with document names
/// </summary>
public static readonly string DocumentNamePattern = @"[^\s*?""<>|][^\t\n\r*?""<>|]*?";
}
}