Parsing wasn't correctly ignoring the ':' in prefix!

git-svn-id: https://zxing.googlecode.com/svn/trunk@339 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2008-04-03 16:12:08 +00:00
parent 0e7872020c
commit 28ea8e02f0

View file

@ -54,15 +54,15 @@ public final class AddressBookAUParsedResult extends ParsedReaderResult {
String[] names = matchMultipleValuePrefix("NAME", 2, rawText);
String[] phoneNumbers = matchMultipleValuePrefix("TEL", 3, rawText);
String[] emails = matchMultipleValuePrefix("MAIL", 3, rawText);
String note = AbstractDoCoMoParsedResult.matchSinglePrefixedField("MEMORY", rawText, '\r');
String address = AbstractDoCoMoParsedResult.matchSinglePrefixedField("ADD", rawText, '\r');
String note = AbstractDoCoMoParsedResult.matchSinglePrefixedField("MEMORY:", rawText, '\r');
String address = AbstractDoCoMoParsedResult.matchSinglePrefixedField("ADD:", rawText, '\r');
return new AddressBookAUParsedResult(names, phoneNumbers, emails, note, address);
}
private static String[] matchMultipleValuePrefix(String prefix, int max, String rawText) {
Vector values = null;
for (int i = 1; i <= max; i++) {
String value = AbstractDoCoMoParsedResult.matchSinglePrefixedField(prefix + i, rawText, '\r');
String value = AbstractDoCoMoParsedResult.matchSinglePrefixedField(prefix + i + ':', rawText, '\r');
if (value == null) {
break;
}