OLD | NEW |
---|---|
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 Loading... | |
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 | |
186 // adjacent y's. | |
187 const char kExpirationDate2DigitYearRe[] = | 185 const char kExpirationDate2DigitYearRe[] = |
188 "exp.*date.*[^y]yy([^y]|$)"; | 186 "^mm\\s*[-/]\\syy$" |
187 // This regex is a little bit nasty, but it is simply requiring exactly two | |
188 // adjacent y's. | |
189 "|exp.*date.*[^y]yy([^y]|$)"; | |
Evan Stade
2015/04/03 20:07:00
^mm\\s*[-/]\\syy$ seems a bit too specific to the
Lei Zhang
2015/04/03 22:37:33
Done.
| |
190 const char kExpirationDate4DigitYearRe[] = | |
191 "^mm\\s*[-/]\\syyyy$"; | |
189 const char kExpirationDateRe[] = | 192 const char kExpirationDateRe[] = |
190 "expir|exp.*date" | 193 "expir|exp.*date" |
191 "|gueltig|gültig" // de-DE | 194 "|gueltig|gültig" // de-DE |
192 "|fecha" // es | 195 "|fecha" // es |
193 "|date.*exp" // fr-FR | 196 "|date.*exp" // fr-FR |
194 "|scadenza" // it-IT | 197 "|scadenza" // it-IT |
195 "|有効期限" // ja-JP | 198 "|有効期限" // ja-JP |
196 "|validade" // pt-BR, pt-PT | 199 "|validade" // pt-BR, pt-PT |
197 "|Срок действия карты"; // ru | 200 "|Срок действия карты"; // ru |
198 const char kGiftCardRe[] = | 201 const char kGiftCardRe[] = |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
285 "prefix|exchange" | 288 "prefix|exchange" |
286 "|preselection" // fr-FR | 289 "|preselection" // fr-FR |
287 "|ddd"; // pt-BR, pt-PT | 290 "|ddd"; // pt-BR, pt-PT |
288 const char kPhoneSuffixRe[] = | 291 const char kPhoneSuffixRe[] = |
289 "suffix"; | 292 "suffix"; |
290 const char kPhoneExtensionRe[] = | 293 const char kPhoneExtensionRe[] = |
291 "\\bext|ext\\b|extension" | 294 "\\bext|ext\\b|extension" |
292 "|ramal"; // pt-BR, pt-PT | 295 "|ramal"; // pt-BR, pt-PT |
293 | 296 |
294 } // namespace autofill | 297 } // namespace autofill |
OLD | NEW |