Is there any regex can create index alias based on weekly/monthly/yearly?

I want to create different date index alias.
Is there any regex can create index alias based on weekly/monthly/yearly?
but the below restful API doesn't work. could anyone help on this?

POST /_aliases
{
"actions": [
{ "add": { "index": "metricbeat-linux-system-{now/w}", "alias": "system" }}
]
}

Those APIs don't do date math for you, you need to do it client side and then make the request.