【发布时间】:2018-04-07 12:52:22
【问题描述】:
我的目标是拥有这样的路线
/confirm/resend : 显示重新发送表格
/confirm/31k41k2k12kl3lk : 检查令牌并重定向
/confirm : 显示表格
我的路由文件是这样的
<Route path="/auth/confirm/resend" component={component.Confirm} />
<Route exact path="/auth/confirm/:token(?!(resend))?" component={component.Confirm} />
问题是:token(?!(resend))?这部分不起作用。
我在这里尝试匹配 /as12k 和 /1231jj1,但不匹配 /resend。
【问题讨论】:
标签: regex reactjs react-router react-router-dom