Skip to content

Commit

Permalink
Merge pull request #126 from dvsa/update-regex
Browse files Browse the repository at this point in the history
fix:update regex for username
  • Loading branch information
sr4850 authored Jan 31, 2025
2 parents a2e1f19 + 549f7e9 commit f6dd38e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.dvsa.testing.lib</groupId>
<artifactId>active-support</artifactId>
<version>2.5.12-SNAPSHOT</version>
<version>2.5.12</version>

<properties>
<annotations.version>24.0.1</annotations.version>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/activesupport/mailPit/MailPit.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ public String retrievePasswordResetLink(@NotNull String emailAddress, long sleep
}

public String retrieveUsernameInfo(String emailAddress) throws MissingRequiredArgument {
String emailContent = retrieveEmailContent(emailAddress, "Your account information");
Pattern pattern = Pattern.compile("(\\b[a-zA-Z]+[0-9]+[a-zA-Z0-9]*\\b)");
String emailContent = retrieveEmailRawContent(emailAddress, "Your account information");
Pattern pattern = Pattern.compile("It=E2=80=99s:\\s*([a-zA-Z0-9]+)");
Matcher matcher = pattern.matcher(emailContent);
if (matcher.find()) {
return matcher.group(1);
Expand Down

0 comments on commit f6dd38e

Please sign in to comment.