RedirectMatch 301 /slug/the-redirected-page/ https://yourwebsite.com.au/new-page/
RewriteEngine On
RewriteCond %{QUERY_STRING} .
RewriteRule ^$ /404/? [R=301,L]
Example:
https://example.com.au/example-removethispart-page-sydney/
https://example.com.au/example-removethispart-page-melbourne/
RewriteEngine On
RewriteRule ^example-removethispart-page-(.*)$ /example-page-$1 [R=301,L]