| 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/common/autofill_regex_constants.h" |
| 10 | 10 |
| 11 namespace autofill { | 11 namespace autofill { |
| 12 | 12 |
| 13 ///////////////////////////////////////////////////////////////////////////// | 13 ///////////////////////////////////////////////////////////////////////////// |
| 14 // address_field.cc | 14 // address_field.cc |
| 15 ///////////////////////////////////////////////////////////////////////////// | 15 ///////////////////////////////////////////////////////////////////////////// |
| 16 const char kAttentionIgnoredRe[] = "attention|attn"; | 16 const char kAttentionIgnoredRe[] = "attention|attn"; |
| 17 const char kRegionIgnoredRe[] = | 17 const char kRegionIgnoredRe[] = |
| 18 "province|region|other" | 18 "province|region|other" |
| 19 "|provincia" // es | 19 "|provincia" // es |
| 20 "|bairro|suburb"; // pt-BR, pt-PT | 20 "|bairro|suburb"; // pt-BR, pt-PT |
| 21 const char kAddressNameIgnoredRe[] = "address.*nickname|address.*label"; | 21 const char kAddressNameIgnoredRe[] = "address.*nickname|address.*label"; |
| 22 const char kCompanyRe[] = | 22 const char kCompanyRe[] = |
| 23 "company|business|organization|organisation" | 23 "company|business|organization|organisation" |
| 24 "|firma|firmenname" // de-DE | 24 "|firma|firmenname" // de-DE |
| 25 "|empresa" // es | 25 "|empresa" // es |
| 26 "|societe|société" // fr-FR | 26 "|societe|société" // fr-FR |
| 27 "|ragione.?sociale" // it-IT | 27 "|ragione.?sociale" // it-IT |
| 28 "|会社" // ja-JP | 28 "|会社" // ja-JP |
| 29 "|название.?компании" // ru | 29 "|название.?компании" // ru |
| 30 "|单位|公司" // zh-CN | 30 "|单位|公司" // zh-CN |
| 31 "|회사|직장"; // ko-KR | 31 "|회사|직장"; // ko-KR |
| 32 const char kAddressLine1Re[] = | 32 const char kAddressLine1Re[] = |
| 33 "^address$|address[_-]?line(one)?|address1|addr1|street" | 33 "^address$|address[_-]?line(one)?|address1|addr1|street" |
| 34 "|(?:shipping|billing)address$" | 34 "|(?:shipping|billing)address$" |
| 35 "|strasse|straße|hausnummer|housenumber" // de-DE | 35 "|strasse|straße|hausnummer|housenumber" // de-DE |
| 36 "|house.?name" // en-GB | 36 "|house.?name" // en-GB |
| 37 "|direccion|dirección" // es | 37 "|direccion|dirección" // es |
| 38 "|adresse" // fr-FR | 38 "|adresse" // fr-FR |
| 39 "|indirizzo" // it-IT | 39 "|indirizzo" // it-IT |
| 40 "|^住所$|住所1" // ja-JP | 40 "|^住所$|住所1" // ja-JP |
| 41 "|morada|endereço" // pt-BR, pt-PT | 41 "|morada|endereço" // pt-BR, pt-PT |
| 42 "|Адрес" // ru | 42 "|Адрес" // ru |
| 43 "|地址" // zh-CN | 43 "|地址" // zh-CN |
| 44 "|^주소.?$|주소.?1"; // ko-KR | 44 "|^주소.?$|주소.?1"; // ko-KR |
| 45 const char kAddressLine1LabelRe[] = | 45 const char kAddressLine1LabelRe[] = |
| 46 "address" | 46 "address" |
| 47 "|adresse" // fr-FR | 47 "|adresse" // fr-FR |
| 48 "|indirizzo" // it-IT | 48 "|indirizzo" // it-IT |
| 49 "|住所" // ja-JP | 49 "|住所" // ja-JP |
| 50 "|地址" // zh-CN | 50 "|地址" // zh-CN |
| 51 "|주소"; // ko-KR | 51 "|주소"; // ko-KR |
| 52 const char kAddressLine2Re[] = | 52 const char kAddressLine2Re[] = |
| 53 "address[_-]?line(2|two)|address2|addr2|street|suite|unit" | 53 "address[_-]?line(2|two)|address2|addr2|street|suite|unit" |
| 54 "|adresszusatz|ergänzende.?angaben" // de-DE | 54 "|adresszusatz|ergänzende.?angaben" // de-DE |
| 55 "|direccion2|colonia|adicional" // es | 55 "|direccion2|colonia|adicional" // es |
| 56 "|addresssuppl|complementnom|appartement" // fr-FR | 56 "|addresssuppl|complementnom|appartement" // fr-FR |
| 57 "|indirizzo2" // it-IT | 57 "|indirizzo2" // it-IT |
| 58 "|住所2" // ja-JP | 58 "|住所2" // ja-JP |
| 59 "|complemento|addrcomplement" // pt-BR, pt-PT | 59 "|complemento|addrcomplement" // pt-BR, pt-PT |
| 60 "|Улица" // ru | 60 "|Улица" // ru |
| 61 "|地址2" // zh-CN | 61 "|地址2" // zh-CN |
| 62 "|주소.?2"; // ko-KR | 62 "|주소.?2"; // ko-KR |
| 63 const char kAddressLine2LabelRe[] = | 63 const char kAddressLine2LabelRe[] = |
| 64 "address|line" | 64 "address|line" |
| 65 "|adresse" // fr-FR | 65 "|adresse" // fr-FR |
| 66 "|indirizzo" // it-IT | 66 "|indirizzo" // it-IT |
| 67 "|地址" // zh-CN | 67 "|地址" // zh-CN |
| 68 "|주소"; // ko-KR | 68 "|주소"; // ko-KR |
| 69 const char kAddressLinesExtraRe[] = | 69 const char kAddressLinesExtraRe[] = |
| 70 "address.*line[3-9]|address[3-9]|addr[3-9]|street|line[3-9]" | 70 "address.*line[3-9]|address[3-9]|addr[3-9]|street|line[3-9]" |
| 71 "|municipio" // es | 71 "|municipio" // es |
| 72 "|batiment|residence" // fr-FR | 72 "|batiment|residence" // fr-FR |
| 73 "|indirizzo[3-9]"; // it-IT | 73 "|indirizzo[3-9]"; // it-IT |
| 74 const char kAddressLookupRe[] = | 74 const char kAddressLookupRe[] = "lookup"; |
| 75 "lookup"; | |
| 76 const char kCountryRe[] = | 75 const char kCountryRe[] = |
| 77 "country|countries" | 76 "country|countries" |
| 78 "|país|pais" // es | 77 "|país|pais" // es |
| 79 "|国" // ja-JP | 78 "|国" // ja-JP |
| 80 "|国家" // zh-CN | 79 "|国家" // zh-CN |
| 81 "|국가|나라"; // ko-KR | 80 "|국가|나라"; // ko-KR |
| 82 const char kCountryLocationRe[] = | 81 const char kCountryLocationRe[] = "location"; |
| 83 "location"; | |
| 84 const char kZipCodeRe[] = | 82 const char kZipCodeRe[] = |
| 85 "zip|postal|post.*code|pcode" | 83 "zip|postal|post.*code|pcode" |
| 86 "|pin.?code" // en-IN | 84 "|pin.?code" // en-IN |
| 87 "|postleitzahl" // de-DE | 85 "|postleitzahl" // de-DE |
| 88 "|\\bcp\\b" // es | 86 "|\\bcp\\b" // es |
| 89 "|\\bcdp\\b" // fr-FR | 87 "|\\bcdp\\b" // fr-FR |
| 90 "|\\bcap\\b" // it-IT | 88 "|\\bcap\\b" // it-IT |
| 91 "|郵便番号" // ja-JP | 89 "|郵便番号" // ja-JP |
| 92 "|codigo|codpos|\\bcep\\b" // pt-BR, pt-PT | 90 "|codigo|codpos|\\bcep\\b" // pt-BR, pt-PT |
| 93 "|Почтовый.?Индекс" // ru | 91 "|Почтовый.?Индекс" // ru |
| 94 "|邮政编码|邮编" // zh-CN | 92 "|邮政编码|邮编" // zh-CN |
| 95 "|郵遞區號" // zh-TW | 93 "|郵遞區號" // zh-TW |
| 96 "|우편.?번호"; // ko-KR | 94 "|우편.?번호"; // ko-KR |
| 97 const char kZip4Re[] = | 95 const char kZip4Re[] = |
| 98 "zip|^-$|post2" | 96 "zip|^-$|post2" |
| 99 "|codpos2"; // pt-BR, pt-PT | 97 "|codpos2"; // pt-BR, pt-PT |
| 100 const char kCityRe[] = | 98 const char kCityRe[] = |
| 101 "city|town" | 99 "city|town" |
| 102 "|\\bort\\b|stadt" // de-DE | 100 "|\\bort\\b|stadt" // de-DE |
| 103 "|suburb" // en-AU | 101 "|suburb" // en-AU |
| 104 "|ciudad|provincia|localidad|poblacion" // es | 102 "|ciudad|provincia|localidad|poblacion" // es |
| 105 "|ville|commune" // fr-FR | 103 "|ville|commune" // fr-FR |
| 106 "|localita" // it-IT | 104 "|localita" // it-IT |
| 107 "|市区町村" // ja-JP | 105 "|市区町村" // ja-JP |
| 108 "|cidade" // pt-BR, pt-PT | 106 "|cidade" // pt-BR, pt-PT |
| 109 "|Город" // ru | 107 "|Город" // ru |
| 110 "|市" // zh-CN | 108 "|市" // zh-CN |
| 111 "|分區" // zh-TW | 109 "|分區" // zh-TW |
| 112 "|^시[^도·・]|시[·・]?군[·・]?구"; // ko-KR | 110 "|^시[^도·・]|시[·・]?군[·・]?구"; // ko-KR |
| 113 const char kStateRe[] = | 111 const char kStateRe[] = |
| 114 "(?<!united )state|county|region|province" | 112 "(?<!united )state|county|region|province" |
| 115 "|land" // de-DE | 113 "|land" // de-DE |
| 116 "|county|principality" // en-UK | 114 "|county|principality" // en-UK |
| 117 "|都道府県" // ja-JP | 115 "|都道府県" // ja-JP |
| 118 "|estado|provincia" // pt-BR, pt-PT | 116 "|estado|provincia" // pt-BR, pt-PT |
| 119 "|область" // ru | 117 "|область" // ru |
| 120 "|省" // zh-CN | 118 "|省" // zh-CN |
| 121 "|地區" // zh-TW | 119 "|地區" // zh-TW |
| 122 "|^시[·・]?도"; // ko-KR | 120 "|^시[·・]?도"; // ko-KR |
| 123 | 121 |
| 124 ///////////////////////////////////////////////////////////////////////////// | 122 ///////////////////////////////////////////////////////////////////////////// |
| 125 // credit_card_field.cc | 123 // credit_card_field.cc |
| 126 ///////////////////////////////////////////////////////////////////////////// | 124 ///////////////////////////////////////////////////////////////////////////// |
| 127 const char kNameOnCardRe[] = | 125 const char kNameOnCardRe[] = |
| 128 "card.?(?:holder|owner)|name.*(\\b)?on(\\b)?.*card" | 126 "card.?(?:holder|owner)|name.*(\\b)?on(\\b)?.*card" |
| 129 "|(?:card|cc).?name|cc.?full.?name" | 127 "|(?:card|cc).?name|cc.?full.?name" |
| 130 "|karteninhaber" // de-DE | 128 "|karteninhaber" // de-DE |
| 131 "|nombre.*tarjeta" // es | 129 "|nombre.*tarjeta" // es |
| 132 "|nom.*carte" // fr-FR | 130 "|nom.*carte" // fr-FR |
| 133 "|nome.*cart" // it-IT | 131 "|nome.*cart" // it-IT |
| 134 "|名前" // ja-JP | 132 "|名前" // ja-JP |
| 135 "|Имя.*карты" // ru | 133 "|Имя.*карты" // ru |
| 136 "|信用卡开户名|开户名|持卡人姓名" // zh-CN | 134 "|信用卡开户名|开户名|持卡人姓名" // zh-CN |
| 137 "|持卡人姓名"; // zh-TW | 135 "|持卡人姓名"; // zh-TW |
| 138 const char kNameOnCardContextualRe[] = | 136 const char kNameOnCardContextualRe[] = "name"; |
| 139 "name"; | |
| 140 const char kCardNumberRe[] = | 137 const char kCardNumberRe[] = |
| 141 "(add)?(?:card|cc|acct).?(?:number|#|no|num|field)" | 138 "(add)?(?:card|cc|acct).?(?:number|#|no|num|field)" |
| 142 "|nummer" // de-DE | 139 "|nummer" // de-DE |
| 143 "|credito|numero|número" // es | 140 "|credito|numero|número" // es |
| 144 "|numéro" // fr-FR | 141 "|numéro" // fr-FR |
| 145 "|カード番号" // ja-JP | 142 "|カード番号" // ja-JP |
| 146 "|Номер.*карты" // ru | 143 "|Номер.*карты" // ru |
| 147 "|信用卡号|信用卡号码" // zh-CN | 144 "|信用卡号|信用卡号码" // zh-CN |
| 148 "|信用卡卡號" // zh-TW | 145 "|信用卡卡號" // zh-TW |
| 149 "|카드"; // ko-KR | 146 "|카드"; // ko-KR |
| 150 const char kCardCvcRe[] = | 147 const char kCardCvcRe[] = |
| 151 "verification|card.?identification|security.?code|card.?code" | 148 "verification|card.?identification|security.?code|card.?code" |
| 152 "|security.?number|card.?pin|c-v-v" | 149 "|security.?number|card.?pin|c-v-v" |
| 153 "|(cvn|cvv|cvc|csc|cvd|cid|ccv)(field)?" | 150 "|(cvn|cvv|cvc|csc|cvd|cid|ccv)(field)?" |
| 154 "|\\bcid\\b"; | 151 "|\\bcid\\b"; |
| 155 | 152 |
| 156 // "Expiration date" is the most common label here, but some pages have | 153 // "Expiration date" is the most common label here, but some pages have |
| 157 // "Expires", "exp. date" or "exp. month" and "exp. year". We also look | 154 // "Expires", "exp. date" or "exp. month" and "exp. year". We also look |
| 158 // for the field names ccmonth and ccyear, which appear on at least 4 of | 155 // for the field names ccmonth and ccyear, which appear on at least 4 of |
| 159 // our test pages. | 156 // our test pages. |
| 160 | 157 |
| 161 // On at least one page (The China Shop2.html) we find only the labels | 158 // On at least one page (The China Shop2.html) we find only the labels |
| 162 // "month" and "year". So for now we match these words directly; we'll | 159 // "month" and "year". So for now we match these words directly; we'll |
| 163 // see if this turns out to be too general. | 160 // see if this turns out to be too general. |
| 164 | 161 |
| 165 // Toolbar Bug 51451: indeed, simply matching "month" is too general for | 162 // Toolbar Bug 51451: indeed, simply matching "month" is too general for |
| 166 // https://rps.fidelity.com/ftgw/rps/RtlCust/CreatePIN/Init. | 163 // https://rps.fidelity.com/ftgw/rps/RtlCust/CreatePIN/Init. |
| 167 // Instead, we match only words beginning with "month". | 164 // Instead, we match only words beginning with "month". |
| 168 const char kExpirationMonthRe[] = | 165 const char kExpirationMonthRe[] = |
| 169 "expir|exp.*mo|exp.*date|ccmonth|cardmonth|addmonth" | 166 "expir|exp.*mo|exp.*date|ccmonth|cardmonth|addmonth" |
| 170 "|gueltig|gültig|monat" // de-DE | 167 "|gueltig|gültig|monat" // de-DE |
| 171 "|fecha" // es | 168 "|fecha" // es |
| 172 "|date.*exp" // fr-FR | 169 "|date.*exp" // fr-FR |
| 173 "|scadenza" // it-IT | 170 "|scadenza" // it-IT |
| 174 "|有効期限" // ja-JP | 171 "|有効期限" // ja-JP |
| 175 "|validade" // pt-BR, pt-PT | 172 "|validade" // pt-BR, pt-PT |
| 176 "|Срок действия карты" // ru | 173 "|Срок действия карты" // ru |
| 177 "|月"; // zh-CN | 174 "|月"; // zh-CN |
| 178 const char kExpirationYearRe[] = | 175 const char kExpirationYearRe[] = |
| 179 "exp|^/|(add)?year" | 176 "exp|^/|(add)?year" |
| 180 "|ablaufdatum|gueltig|gültig|jahr" // de-DE | 177 "|ablaufdatum|gueltig|gültig|jahr" // de-DE |
| 181 "|fecha" // es | 178 "|fecha" // es |
| 182 "|scadenza" // it-IT | 179 "|scadenza" // it-IT |
| 183 "|有効期限" // ja-JP | 180 "|有効期限" // ja-JP |
| 184 "|validade" // pt-BR, pt-PT | 181 "|validade" // pt-BR, pt-PT |
| 185 "|Срок действия карты" // ru | 182 "|Срок действия карты" // ru |
| 186 "|年|有效期"; // zh-CN | 183 "|年|有效期"; // zh-CN |
| 187 | 184 |
| 188 // Used to match a expiration date field with a two digit year. | 185 // Used to match a expiration date field with a two digit year. |
| 189 // The following conditions must be met: | 186 // The following conditions must be met: |
| 190 // - Exactly two adjacent y's. | 187 // - Exactly two adjacent y's. |
| 191 // - (optional) Exactly two adjacent m's before the y's. | 188 // - (optional) Exactly two adjacent m's before the y's. |
| 192 // - (optional) Separated by white-space and/or a dash or slash. | 189 // - (optional) Separated by white-space and/or a dash or slash. |
| 193 // - (optional) Prepended with some text similar to "Expiration Date". | 190 // - (optional) Prepended with some text similar to "Expiration Date". |
| 194 // Tested in components/autofill/core/common/autofill_regexes_unittest.cc | 191 // Tested in components/autofill/core/common/autofill_regexes_unittest.cc |
| 195 const char kExpirationDate2DigitYearRe[] = | 192 const char kExpirationDate2DigitYearRe[] = |
| 196 "(?:exp.*date[^y\\n\\r]*|mm\\s*[-/]?\\s*)yy(?:[^y]|$)"; | 193 "(?:exp.*date[^y\\n\\r]*|mm\\s*[-/]?\\s*)yy(?:[^y]|$)"; |
| 197 // Used to match a expiration date field with a four digit year. | 194 // Used to match a expiration date field with a four digit year. |
| 198 // Same requirements as |kExpirationDate2DigitYearRe| except: | 195 // Same requirements as |kExpirationDate2DigitYearRe| except: |
| 199 // - Exactly four adjacent y's. | 196 // - Exactly four adjacent y's. |
| 200 // Tested in components/autofill/core/common/autofill_regexes_unittest.cc | 197 // Tested in components/autofill/core/common/autofill_regexes_unittest.cc |
| 201 const char kExpirationDate4DigitYearRe[] = | 198 const char kExpirationDate4DigitYearRe[] = |
| 202 "(?:exp.*date[^y\\n\\r]*|mm\\s*[-/]?\\s*)yyyy(?:[^y]|$)"; | 199 "(?:exp.*date[^y\\n\\r]*|mm\\s*[-/]?\\s*)yyyy(?:[^y]|$)"; |
| 203 // Used to match expiration date fields that do not specify a year length. | 200 // Used to match expiration date fields that do not specify a year length. |
| 204 const char kExpirationDateRe[] = | 201 const char kExpirationDateRe[] = |
| 205 "expir|exp.*date|^expfield$" | 202 "expir|exp.*date|^expfield$" |
| 206 "|gueltig|gültig" // de-DE | 203 "|gueltig|gültig" // de-DE |
| 207 "|fecha" // es | 204 "|fecha" // es |
| 208 "|date.*exp" // fr-FR | 205 "|date.*exp" // fr-FR |
| 209 "|scadenza" // it-IT | 206 "|scadenza" // it-IT |
| 210 "|有効期限" // ja-JP | 207 "|有効期限" // ja-JP |
| 211 "|validade" // pt-BR, pt-PT | 208 "|validade" // pt-BR, pt-PT |
| 212 "|Срок действия карты"; // ru | 209 "|Срок действия карты"; // ru |
| 213 const char kGiftCardRe[] = | 210 const char kGiftCardRe[] = "gift.?card"; |
| 214 "gift.?card"; | |
| 215 const char kDebitGiftCardRe[] = | 211 const char kDebitGiftCardRe[] = |
| 216 "(?:visa|mastercard|discover|amex|american express).*gift.?card"; | 212 "(?:visa|mastercard|discover|amex|american express).*gift.?card"; |
| 217 const char kDebitCardRe[] = | 213 const char kDebitCardRe[] = "debit.*card"; |
| 218 "debit.*card"; | |
| 219 | |
| 220 | 214 |
| 221 ///////////////////////////////////////////////////////////////////////////// | 215 ///////////////////////////////////////////////////////////////////////////// |
| 222 // email_field.cc | 216 // email_field.cc |
| 223 ///////////////////////////////////////////////////////////////////////////// | 217 ///////////////////////////////////////////////////////////////////////////// |
| 224 const char kEmailRe[] = | 218 const char kEmailRe[] = |
| 225 "e.?mail" | 219 "e.?mail" |
| 226 "|courriel" // fr | 220 "|courriel" // fr |
| 227 "|メールアドレス" // ja-JP | 221 "|メールアドレス" // ja-JP |
| 228 "|Электронной.?Почты" // ru | 222 "|Электронной.?Почты" // ru |
| 229 "|邮件|邮箱" // zh-CN | 223 "|邮件|邮箱" // zh-CN |
| 230 "|電郵地址" // zh-TW | 224 "|電郵地址" // zh-TW |
| 231 "|(?:이메일|전자.?우편|[Ee]-?mail)(.?주소)?"; // ko-KR | 225 "|(?:이메일|전자.?우편|[Ee]-?mail)(.?주소)?"; // ko-KR |
| 232 | 226 |
| 233 | |
| 234 ///////////////////////////////////////////////////////////////////////////// | 227 ///////////////////////////////////////////////////////////////////////////// |
| 235 // name_field.cc | 228 // name_field.cc |
| 236 ///////////////////////////////////////////////////////////////////////////// | 229 ///////////////////////////////////////////////////////////////////////////// |
| 237 const char kNameIgnoredRe[] = | 230 const char kNameIgnoredRe[] = |
| 238 "user.?name|user.?id|nickname|maiden name|title|prefix|suffix" | 231 "user.?name|user.?id|nickname|maiden name|title|prefix|suffix" |
| 239 "|vollständiger.?name" // de-DE | 232 "|vollständiger.?name" // de-DE |
| 240 "|用户名" // zh-CN | 233 "|用户名" // zh-CN |
| 241 "|(?:사용자.?)?아이디|사용자.?ID"; // ko-KR | 234 "|(?:사용자.?)?아이디|사용자.?ID"; // ko-KR |
| 242 const char kNameRe[] = | 235 const char kNameRe[] = |
| 243 "^name|full.?name|your.?name|customer.?name|bill.?name|ship.?name" | 236 "^name|full.?name|your.?name|customer.?name|bill.?name|ship.?name" |
| 244 "|name.*first.*last|firstandlastname" | 237 "|name.*first.*last|firstandlastname" |
| 245 "|nombre.*y.*apellidos" // es | 238 "|nombre.*y.*apellidos" // es |
| 246 "|^nom" // fr-FR | 239 "|^nom" // fr-FR |
| 247 "|お名前|氏名" // ja-JP | 240 "|お名前|氏名" // ja-JP |
| 248 "|^nome" // pt-BR, pt-PT | 241 "|^nome" // pt-BR, pt-PT |
| 249 "|姓名" // zh-CN | 242 "|姓名" // zh-CN |
| 250 "|성명"; // ko-KR | 243 "|성명"; // ko-KR |
| 251 const char kNameSpecificRe[] = | 244 const char kNameSpecificRe[] = |
| 252 "^name" | 245 "^name" |
| 253 "|^nom" // fr-FR | 246 "|^nom" // fr-FR |
| 254 "|^nome"; // pt-BR, pt-PT | 247 "|^nome"; // pt-BR, pt-PT |
| 255 const char kFirstNameRe[] = | 248 const char kFirstNameRe[] = |
| 256 "first.*name|initials|fname|first$|given.*name" | 249 "first.*name|initials|fname|first$|given.*name" |
| 257 "|vorname" // de-DE | 250 "|vorname" // de-DE |
| 258 "|nombre" // es | 251 "|nombre" // es |
| 259 "|forename|prénom|prenom" // fr-FR | 252 "|forename|prénom|prenom" // fr-FR |
| 260 "|名" // ja-JP | 253 "|名" // ja-JP |
| 261 "|nome" // pt-BR, pt-PT | 254 "|nome" // pt-BR, pt-PT |
| 262 "|Имя" // ru | 255 "|Имя" // ru |
| 263 "|이름"; // ko-KR | 256 "|이름"; // ko-KR |
| 264 const char kMiddleInitialRe[] = "middle.*initial|m\\.i\\.|mi$|\\bmi\\b"; | 257 const char kMiddleInitialRe[] = "middle.*initial|m\\.i\\.|mi$|\\bmi\\b"; |
| 265 const char kMiddleNameRe[] = | 258 const char kMiddleNameRe[] = |
| 266 "middle.*name|mname|middle$" | 259 "middle.*name|mname|middle$" |
| 267 "|apellido.?materno|lastlastname"; // es | 260 "|apellido.?materno|lastlastname"; // es |
| 268 const char kLastNameRe[] = | 261 const char kLastNameRe[] = |
| 269 "last.*name|lname|surname|last$|secondname|family.*name" | 262 "last.*name|lname|surname|last$|secondname|family.*name" |
| 270 "|nachname" // de-DE | 263 "|nachname" // de-DE |
| 271 "|apellido" // es | 264 "|apellido" // es |
| 272 "|famille|^nom" // fr-FR | 265 "|famille|^nom" // fr-FR |
| 273 "|cognome" // it-IT | 266 "|cognome" // it-IT |
| 274 "|姓" // ja-JP | 267 "|姓" // ja-JP |
| 275 "|morada|apelidos|surename|sobrenome" // pt-BR, pt-PT | 268 "|morada|apelidos|surename|sobrenome" // pt-BR, pt-PT |
| 276 "|Фамилия" // ru | 269 "|Фамилия" // ru |
| 277 "|\\b성(?:[^명]|\\b)"; // ko-KR | 270 "|\\b성(?:[^명]|\\b)"; // ko-KR |
| 278 | 271 |
| 279 ///////////////////////////////////////////////////////////////////////////// | 272 ///////////////////////////////////////////////////////////////////////////// |
| 280 // phone_field.cc | 273 // phone_field.cc |
| 281 ///////////////////////////////////////////////////////////////////////////// | 274 ///////////////////////////////////////////////////////////////////////////// |
| 282 const char kPhoneRe[] = | 275 const char kPhoneRe[] = |
| 283 "phone|mobile|contact.?number" | 276 "phone|mobile|contact.?number" |
| 284 "|telefonnummer" // de-DE | 277 "|telefonnummer" // de-DE |
| 285 "|telefono|teléfono" // es | 278 "|telefono|teléfono" // es |
| 286 "|telfixe" // fr-FR | 279 "|telfixe" // fr-FR |
| 287 "|電話" // ja-JP | 280 "|電話" // ja-JP |
| 288 "|telefone|telemovel" // pt-BR, pt-PT | 281 "|telefone|telemovel" // pt-BR, pt-PT |
| 289 "|телефон" // ru | 282 "|телефон" // ru |
| 290 "|电话" // zh-CN | 283 "|电话" // zh-CN |
| 291 "|(?:전화|핸드폰|휴대폰|휴대전화)(?:.?번호)?"; // ko-KR | 284 "|(?:전화|핸드폰|휴대폰|휴대전화)(?:.?번호)?"; // ko-KR |
| 292 const char kCountryCodeRe[] = | 285 const char kCountryCodeRe[] = "country.*code|ccode|_cc"; |
| 293 "country.*code|ccode|_cc"; | 286 const char kAreaCodeNotextRe[] = "^\\($"; |
| 294 const char kAreaCodeNotextRe[] = | |
| 295 "^\\($"; | |
| 296 const char kAreaCodeRe[] = | 287 const char kAreaCodeRe[] = |
| 297 "area.*code|acode|area" | 288 "area.*code|acode|area" |
| 298 "|지역.?번호"; // ko-KR | 289 "|지역.?번호"; // ko-KR |
| 299 const char kPhonePrefixSeparatorRe[] = | 290 const char kPhonePrefixSeparatorRe[] = "^-$|^\\)$"; |
| 300 "^-$|^\\)$"; | 291 const char kPhoneSuffixSeparatorRe[] = "^-$"; |
| 301 const char kPhoneSuffixSeparatorRe[] = | |
| 302 "^-$"; | |
| 303 const char kPhonePrefixRe[] = | 292 const char kPhonePrefixRe[] = |
| 304 "prefix|exchange" | 293 "prefix|exchange" |
| 305 "|preselection" // fr-FR | 294 "|preselection" // fr-FR |
| 306 "|ddd"; // pt-BR, pt-PT | 295 "|ddd"; // pt-BR, pt-PT |
| 307 const char kPhoneSuffixRe[] = | 296 const char kPhoneSuffixRe[] = "suffix"; |
| 308 "suffix"; | |
| 309 const char kPhoneExtensionRe[] = | 297 const char kPhoneExtensionRe[] = |
| 310 "\\bext|ext\\b|extension" | 298 "\\bext|ext\\b|extension" |
| 311 "|ramal"; // pt-BR, pt-PT | 299 "|ramal"; // pt-BR, pt-PT |
| 312 const char kUPIVirtualPaymentAddressRe[] = | 300 const char kUPIVirtualPaymentAddressRe[] = |
| 313 "^\\w+@(" | 301 "^\\w+@(" |
| 314 "upi|" // BHIM Bharat Interface for Money | 302 "upi|" // BHIM Bharat Interface for Money |
| 315 "allbank|" // Allahabad Bank UPI | 303 "allbank|" // Allahabad Bank UPI |
| 316 "andb|" // Andhra Bank ONE | 304 "andb|" // Andhra Bank ONE |
| 317 "axisbank|" // Axis Pay | 305 "axisbank|" // Axis Pay |
| 318 "barodampay|" // Baroda MPay | 306 "barodampay|" // Baroda MPay |
| (...skipping 14 matching lines...) Expand all Loading... |
| 333 "sbi|" // SBI Pay | 321 "sbi|" // SBI Pay |
| 334 "tjsp|" // TranZapp | 322 "tjsp|" // TranZapp |
| 335 "uco|" // UCO UPI | 323 "uco|" // UCO UPI |
| 336 "unionbank|" // Union Bank UPI | 324 "unionbank|" // Union Bank UPI |
| 337 "united|" // United UPI | 325 "united|" // United UPI |
| 338 "vijb|" // Vijaya UPI App | 326 "vijb|" // Vijaya UPI App |
| 339 "ybl" // Yes Pay | 327 "ybl" // Yes Pay |
| 340 ")$"; | 328 ")$"; |
| 341 | 329 |
| 342 } // namespace autofill | 330 } // namespace autofill |
| OLD | NEW |