Assignment finished - Completed Main and Bonus exercises #1

Merged
peyman merged 10 commits from develop into main 2026-04-25 21:48:14 +00:00
Showing only changes of commit 11c748526e - Show all commits
+1 -1
View File
@@ -20,7 +20,7 @@ public class BonusExercises {
- Each segment (between dots) must follow same hyphen rules
*/
public boolean validateEmail(String email) {
String regex = ""; // todo
String regex = "^[a-zA-z0-9_+-]+(?:\\.[a-zA-Z0-9_+-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+$"; // todo
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(email);