// Copyright 2013 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_REGEX_CONSTANTS_H_ #define COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_REGEX_CONSTANTS_H_ namespace autofill { // TODO(crbug.com/40280853): This regex corresponds to the // "CREDIT_CARD_VERIFICATION_CODE" pattern. However, it has a use in password // manager code, which doesn't use pattern provider. Either move this constant // to password manager code or use the pattern provider pattern in // password manager. inline constexpr char16_t kCardCvcRe[] = …; ///////////////////////////////////////////////////////////////////////////// // All regexes below this point are non-parsing related and thus don't have a // JSON based definition. ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // data_model_utils.cc ///////////////////////////////////////////////////////////////////////////// inline constexpr char16_t kAugmentedPhoneCountryCodeRe[] = …; ///////////////////////////////////////////////////////////////////////////// // validation.cc ///////////////////////////////////////////////////////////////////////////// // Used to match field data that might be a UPI Virtual Payment Address. // See: // - http://crbug.com/702220 // - https://upipayments.co.in/virtual-payment-address-vpa/ inline constexpr char16_t kUPIVirtualPaymentAddressRe[] = …; // Used to match field value that might be an International Bank Account Number. // TODO(crbug.com/40633135): The regex doesn't match IBANs for Saint Lucia (LC), // Kazakhstan (KZ) and Romania (RO). Consider replace the regex with something // like "(?:IT|SM)\d{2}[A-Z]\d{22}|CY\d{2}[A-Z]\d{23}...". For reference: // - https://www.swift.com/resource/iban-registry-pdf inline constexpr char16_t kInternationalBankAccountNumberValueRe[] = …; // Matches all 3 and 4 digit numbers. inline constexpr char16_t kCreditCardCVCPattern[] = …; // Matches numbers in the range [2010-2099]. inline constexpr char16_t kCreditCard4DigitExpYearPattern[] = …; ///////////////////////////////////////////////////////////////////////////// // form_structure.cc ///////////////////////////////////////////////////////////////////////////// // Match the path values for form actions that look like generic search: // e.g. /search // /search/ // /search/products... // /products/search/ // /blah/search_all.jsp inline constexpr char16_t kUrlSearchActionRe[] = …; } // namespace autofill #endif // COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_REGEX_CONSTANTS_H_