Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1351)

Side by Side Diff: components/autofill/core/browser/autofill_regex_constants.cc.utf8

Issue 1048363002: Autofill: Recognize more credit card date fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@autofill_exp
Patch Set: nit, rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file contains UTF8 strings that we want as char arrays. To avoid 5 // This file contains UTF8 strings that we want as char arrays. To avoid
6 // different compilers, we use a script to convert the UTF8 strings into 6 // different compilers, we use a script to convert the UTF8 strings into
7 // numeric literals (\x##). 7 // numeric literals (\x##).
8 8
9 #include "components/autofill/core/browser/autofill_regex_constants.h" 9 #include "components/autofill/core/browser/autofill_regex_constants.h"
10 10
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 const char kExpirationYearRe[] = 175 const char kExpirationYearRe[] =
176 "exp|^/|year" 176 "exp|^/|year"
177 "|ablaufdatum|gueltig|gültig|yahr" // de-DE 177 "|ablaufdatum|gueltig|gültig|yahr" // de-DE
178 "|fecha" // es 178 "|fecha" // es
179 "|scadenza" // it-IT 179 "|scadenza" // it-IT
180 "|有効期限" // ja-JP 180 "|有効期限" // ja-JP
181 "|validade" // pt-BR, pt-PT 181 "|validade" // pt-BR, pt-PT
182 "|Срок действия карты" // ru 182 "|Срок действия карты" // ru
183 "|年|有效期"; // zh-CN 183 "|年|有效期"; // zh-CN
184 184
185 // This regex is a little bit nasty, but it is simply requiring exactly two 185 // The "yy" portion of the regex is just looking for two adjacent y's.
186 // adjacent y's.
187 const char kExpirationDate2DigitYearRe[] = 186 const char kExpirationDate2DigitYearRe[] =
188 "exp.*date.*[^y]yy([^y]|$)"; 187 "(exp.*date.*|mm\\s*[-/]\\s*)[^y]yy([^y]|$)";
188 const char kExpirationDate4DigitYearRe[] =
189 "^mm\\s*[-/]\\syyyy$";
189 const char kExpirationDateRe[] = 190 const char kExpirationDateRe[] =
190 "expir|exp.*date" 191 "expir|exp.*date"
191 "|gueltig|gültig" // de-DE 192 "|gueltig|gültig" // de-DE
192 "|fecha" // es 193 "|fecha" // es
193 "|date.*exp" // fr-FR 194 "|date.*exp" // fr-FR
194 "|scadenza" // it-IT 195 "|scadenza" // it-IT
195 "|有効期限" // ja-JP 196 "|有効期限" // ja-JP
196 "|validade" // pt-BR, pt-PT 197 "|validade" // pt-BR, pt-PT
197 "|Срок действия карты"; // ru 198 "|Срок действия карты"; // ru
198 const char kGiftCardRe[] = 199 const char kGiftCardRe[] =
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 "prefix|exchange" 290 "prefix|exchange"
290 "|preselection" // fr-FR 291 "|preselection" // fr-FR
291 "|ddd"; // pt-BR, pt-PT 292 "|ddd"; // pt-BR, pt-PT
292 const char kPhoneSuffixRe[] = 293 const char kPhoneSuffixRe[] =
293 "suffix"; 294 "suffix";
294 const char kPhoneExtensionRe[] = 295 const char kPhoneExtensionRe[] =
295 "\\bext|ext\\b|extension" 296 "\\bext|ext\\b|extension"
296 "|ramal"; // pt-BR, pt-PT 297 "|ramal"; // pt-BR, pt-PT
297 298
298 } // namespace autofill 299 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_regex_constants.h ('k') | components/autofill/core/browser/credit_card_field.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698