Index: chrome/browser/autofill/name_field.cc |
diff --git a/chrome/browser/autofill/name_field.cc b/chrome/browser/autofill/name_field.cc |
index 12b37ce09608da6784ea926445c079bbc581df90..8163d7aa9d3d1b8c5946b0ff73ab7f70e3a0a56d 100644 |
--- a/chrome/browser/autofill/name_field.cc |
+++ b/chrome/browser/autofill/name_field.cc |
@@ -77,7 +77,7 @@ FirstLastNameField* FirstLastNameField::Parse2( |
// American-style). |
// The ".*first$" matches fields ending in "first" (example in sample8.html). |
string16 match = |
- ASCIIToUTF16("first *name|first_name|initials|fname|.*first$"); |
+ ASCIIToUTF16("first *name|first_name|initials|fname|first$"); |
if (!ParseText(&q, match, &v->first_name_)) |
return NULL; |
@@ -86,16 +86,16 @@ FirstLastNameField* FirstLastNameField::Parse2( |
// as both (the label text is "MI" and the element name is |
// "txtmiddlename"); such a field probably actually represents a |
// middle initial. |
- match = ASCIIToUTF16("^mi$|middle initial|middleinitial|m.i."); |
+ match = ASCIIToUTF16("middle *initial|middle_initial|m\\.i\\.|mi$"); |
if (ParseText(&q, match, &v->middle_name_)) { |
v->middle_initial_ = true; |
} else { |
- match = ASCIIToUTF16("middle *name|mname"); |
+ match = ASCIIToUTF16("middle *name|middle_name|mname|middle$"); |
ParseText(&q, match, &v->middle_name_); |
} |
// The ".*last$" matches fields ending in "last" (example in sample8.html). |
- match = ASCIIToUTF16("last *name|last_name|lname|surname|.*last$"); |
+ match = ASCIIToUTF16("last *name|last_name|lname|surname|last$"); |
if (!ParseText(&q, match, &v->last_name_)) |
return NULL; |