From 5cd61b66283b55e639490151d4e730a840ab13d5 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 28 Sep 2019 11:58:59 -0600 Subject: regex: Add LEXACT_ONLY8 node type This is like LEXACT, but it is known that only strings encoded in UTF-8 will match it, so don't even have to try if that condition isn't met. --- regcomp.sym | 1 + 1 file changed, 1 insertion(+) (limited to 'regcomp.sym') diff --git a/regcomp.sym b/regcomp.sym index 5512c0f8a1..fd594dfdcd 100644 --- a/regcomp.sym +++ b/regcomp.sym @@ -141,6 +141,7 @@ EXACTFAA_NO_TRIE EXACT, str ; Like EXACT, but match using /iaa rules (string EXACT_ONLY8 EXACT, str ; Like EXACT, but only UTF-8 encoded targets can match +LEXACT_ONLY8 EXACT, len:str 1 ; Like LEXACT, but only UTF-8 encoded targets can match EXACTFU_ONLY8 EXACT, str ; Like EXACTFU, but only UTF-8 encoded targets can match # One could add EXACTFAA8 and something that has the same effect for /l, # but these would be extremely uncommon -- cgit v1.2.1