iRule - Replace a part of uri

I need to replace part of the URL: … at … so when the URL is called with / ab_cd / replace it with / ab-cd /

How can I do it ?

Thank you

when HTTP_REQUEST {
    if { [HTTP::uri] starts_with "/ab_cd/" } {
        HTTP::uri [string map {"/ab_cd/" "/ab-cd/"} [HTTP::uri]]
    }
}

Thank you :wink: