pjfanning opened a new issue, #852:
URL: https://github.com/apache/pekko-management/issues/852

   I don't think that any of the regex code in this module is on the hotpath 
but we could potentially change our String.replaceAll(regex, newValue) calls 
with:
   ```
   import java.util.regex.Pattern
   
   val UNDERSCORE_OR_DOT = Pattern.compile("[_.]");
   val Pattern INVALID_CHARS = Pattern.compile("[^-a-z0-9]");
   
       val str: String = ...
       val withHyphens = UNDERSCORE_OR_DOT.matcher(lower).replaceAll("-")
       val normalized = INVALID_CHARS.matcher(withHyphens).replaceAll("")
   ```
   
   There are 5 or 6 different regexes that could be looked at. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to