如何从链接中提取单词?
面临问题。我获得了一个链接,需要提取密码-RESET
,我该怎么做?例如,要获取代码
我使用QUERYPARAMETERS ['code']
,但是如何从链接中提取password-password-reset
我需要此文本进行导航?
链接
https://test.test.test.test/app/password-reset?code=6294
需要获得
password-reset
Faced a problem. I get a link and I need to extract a password-reset
, how can I do this? For example, to get code
I use queryParameters['code']
, but how do I extract the word password-reset
from the link, I need this text for navigation?
link
https://test.test.test.test/app/password-reset?code=6294
need to get
password-reset
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用
substring
,代码将在最后一个/
和第一个?
之间提取文本:Use
substring
, the code will extract the text between the last/
and the first?
:如果您有相同的链接,并且知道字母的索引位置,这将对您有所帮助。
If you have the same link, and know the index position of the letters.This would be helpful for you.