Skip to content

Commit

Permalink
Merge pull request #161 from khoa-nd/master
Browse files Browse the repository at this point in the history
Merged
  • Loading branch information
khoa-nd committed Feb 5, 2015
2 parents 74f53b9 + 5777888 commit 1c7d9bb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private void processUserEmail(UserImportData user) {
}
}

private static void extractUserSkillSetFromDescription(UserImportData user) {
private void extractUserSkillSetFromDescription(UserImportData user) {
if (StringUtils.isNotEmpty(user.getDescription())) {
final String USER_DESCRIPTION_PATTERN = "([A-Za-z0-9-_]+)*\\shas\\s([0-9]+)*\\s(repositories|repository)\\swritten\\sin\\s"
+ "(([-\\w\\s,\\+#\\(\\)']+)*|([-\\w\\s,\\+#\\(\\)']+)*\\sand\\s([-\\w\\+#\\(\\)']+)*)\\.\\s"
Expand All @@ -44,7 +44,7 @@ private static void extractUserSkillSetFromDescription(UserImportData user) {
Matcher matcher = pattern.matcher(user.getDescription());
if (matcher.matches()) {
user.setNumberOfRepositories(Integer.valueOf(matcher.group(2)));
String skills = matcher.group(4).replaceAll("and", EmailValidator.COMMA);
String skills = matcher.group(4).replaceAll("and", EmailValidator.COMMA).replaceAll("available", "");
user.setSkills(Arrays.asList(StringUtils.split(StringUtils.deleteWhitespace(skills), EmailValidator.COMMA)));
}
}
Expand Down

0 comments on commit 1c7d9bb

Please sign in to comment.