Skip to content
Snippets Groups Projects
Commit b2e4b81a authored by Mirco Nasuti's avatar Mirco Nasuti
Browse files

add email and gender detection

parent 854466dd
No related branches found
No related tags found
No related merge requests found
...@@ -73,6 +73,29 @@ public class User { ...@@ -73,6 +73,29 @@ public class User {
this.lastname = m.group(1); this.lastname = m.group(1);
} }
p = Pattern.compile("value=([\\w.]+@[\\w.]+)");
m = p.matcher(userInfo);
if (m.find()) {
System.out.println(m.group(1));
this.email = m.group(1);
}
p = Pattern.compile("title=([\\w ]+)");
m = p.matcher(userInfo);
if (m.find()) {
System.out.println(m.group(1));
if(m.group(1).equals("Mr"))
{
this.gender = "Male";
System.out.println("->Male");
}
else
{
this.gender = "Female";
System.out.println("->Female");
}
}
} }
public Long getId() { public Long getId() {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment