zanninso 4 weeks ago committed by GitHub
parent
commit
681a420488
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      subjects/java/piscine/RegexReplace/README.md

2
subjects/java/piscine/RegexReplace/README.md

@ -6,7 +6,7 @@ Create a file `RegexReplace.java`.
Write a function `removeUnits` that returns the string where the units `cm` and `€` are removed if they follow directly a number and followed by a space.
Write a function `obfuscateEmail` that returns a string where parts of email addresses are replaced by '*' if they follow the rules below:
- Hide from the username any character next to `-`, `.` or `_` if they exist. Otherwise, hide 3 characters from the username if its length > 3
- Hide from the username any character next to `-`, `.` or `_` if they exist. Otherwise, hide 3 characters at most from the username if its length > 3
- If the remaining part after `@` is in the format `@<third level domain>.<second level domain>.<top level domain>`, then hide the third and top level domains, otherwise hide the second level domain and the top level domain if it is not included in `.com`, `.org` and `.net`.
### Expected Functions

Loading…
Cancel
Save