I went to this setting Admin > Permalinks > Settings
Which says it will apply the regex before matching the permalink.
I have an old xenforo forum URL which is
http://localhost/threads/xyz-abc-is-ghp.223846/
And the new discourse URL is
http://localhost/t/xyz-abc-is-ghp/274528
When I enter the xenforo URL in the browser without the slug like the following then it is redirecting fine but not with it.
http://localhost/threads/223846/
So I tried to use the following regex to strip the slug out but it seems to be doing nothing. Am I missing a step or is this not how its to be done?
/^(/threads/)[^.]+.(\d+)/?$/+/\1\2