Redirects from wordpress to a new ghost site here is an example Yaml/Json file not working

I am redirecting the old URLs to the new ones in Ghost which applies as follows:
old URL
domain.com/yyyyy/MM/DD/post-slug
New domain.com/post-slug

here is a snapshot from the Json file

301:
https://alghadouni.com/2024/02/17/it-is-not-the-tool-it-is-your-strategy/: https://www.alghadouni.com/it-is-not-the-tool-it-is-your-strategy/```

error message" something went wrong, try again" I tried many times different browsers, but it was not working.

You’re missing two spaces before the redirect.

One generally doesn’t include the domain name in the redirect.

Also, if the post titles are unchanged you can simplify things considerably with a single line.

Something along the lines of:

302:
   ^\/(\d*)\/(\d*)\/(\d*)\/([a-z0-9-]+)\/$: /$4

Use a 302 until all is working.

Hi Guys still same issue the error from the admin is the same.

Hang on - are you uploading this as routes.yaml, or routes.json? The format you’re showing is yaml…