Package 

Class SanitizeRule


  • 
    public final class SanitizeRule
    
                        

    A rule that replaces matching text in HTTP transaction fields with a masked placeholder.

    Not a data class because Regex does not implement value-based equality. Two rules are equal when their pattern, options, and label are equal.

    Use SanitizeRule.PHONE, SanitizeRule.EMAIL, or SanitizeRule.BEARER_TOKEN for common masking needs.

    val creditCard = SanitizeRule(
        regex = Regex("""\b\d{4}[\s\-]?\d{4}[\s\-]?\d{4}[\s\-]?\d{4}\b"""),
        label = "CARD"
    )