I have regex like this:
^page/(?P<id>d+)-(?P<slug>[^.]+).html$
and an array:
$args = array(
'id' => 5,
'slug' => 'my-first-article'
);
I would like to have function:
my_function($regex, $args)
which will return this result:
page/5-my-first-article.html
How can this be achieved?
Something like https://docs.djangoproject.com/en/dev/ref/urlresolvers/#reverse
See Question&Answers more detail:os