[chronojump] processMultidatabases personCode for Ulm
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] processMultidatabases personCode for Ulm
- Date: Sat, 18 Jan 2020 15:41:23 +0000 (UTC)
commit 2343d048b9a5b60628daeeb8f61670de1513fa65
Author: Xavier de Blas <xaviblas gmail com>
Date: Sat Jan 18 16:39:38 2020 +0100
processMultidatabases personCode for Ulm
processMultiDatabases/person.cs | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
---
diff --git a/processMultiDatabases/person.cs b/processMultiDatabases/person.cs
index 14b0e413..3c89324c 100644
--- a/processMultiDatabases/person.cs
+++ b/processMultiDatabases/person.cs
@@ -91,6 +91,22 @@ public class Person {
if(match.Groups.Count == 2)
return match.Groups[1].Value;
}
+ else if(city == "ulm")
+ {
+ //note that just after the A2 can be the code, eg. A404559, so remove the A2 or a3 or
A4 if exists
+ string nameClean = name;
+ nameClean.Replace("a2", "");
+ nameClean.Replace("A2", "");
+ nameClean.Replace("a3", "");
+ nameClean.Replace("A3", "");
+ nameClean.Replace("a4", "");
+ nameClean.Replace("A5", "");
+
+ //then return the number
+ Match match = Regex.Match(nameClean, @"(\d+)");
+ if(match.Groups.Count == 2)
+ return match.Value;
+ }
return "";
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]