HAProxy Upgrade 1.9 to 2.2

I’m setting up a new HAProxy server and I can’t seem to get two of the setting I’ve inherited to work on the new version.

reqrep ^([^\ :])\ /public2.key(.) \1\ /art/api/public\2

reqrep ^([^\ :])\ /iso/products(.) \1\ /art/reproducts\2

I believe I have to use http-request now but not sure the syntax. Any help would be greatly appreciated.

my changes from 1.x to 2.2 were

this is output of my git show … command

-	reqrep ^([^\ :]*)\ /oldpath/sub/(.*)     \1\ /newpath/sub/\2
+	http-request replace-path /oldpath/sub/(.*)     /newpath/sub/\1