|
|
@@ -8,19 +8,19 @@ namespace System.Text.RegularExpressions |
|
|
|
internal static class RegexUtils |
|
|
|
{ |
|
|
|
internal const byte Q = 5; // quantifier |
|
|
|
internal const byte S = 4; // ordinary stoppper |
|
|
|
internal const byte S = 4; // ordinary stopper |
|
|
|
internal const byte Z = 3; // ScanBlank stopper |
|
|
|
internal const byte X = 2; // whitespace |
|
|
|
internal const byte E = 1; // should be escaped |
|
|
|
|
|
|
|
internal static readonly byte[] _category = new byte[] { |
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 1 2 3 4 5 6 7 8 9 A B C D E F |
|
|
|
// 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 1 2 3 4 5 6 7 8 9 A B C D E F |
|
|
|
0,0,0,0,0,0,0,0,0,X,X,0,X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
|
|
|
// ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? |
|
|
|
// ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? |
|
|
|
X,0,0,Z,S,0,0,0,S,S,Q,Q,0,0,S,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,Q, |
|
|
|
// @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ |
|
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,S,S,0,S,0, |
|
|
|
// ' a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ |
|
|
|
// ' a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ |
|
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,Q,S,0,0,0}; |
|
|
|
|
|
|
|
internal static string EscapeExcluding(string input, params char[] exclude) |
|
|
|