原文链接:https://blog.csdn.net/caiyongshengCSDN/article/details/88420416 ...
要求:获取某个字符指定字符的前面或后面的所有字符内容 示例: URL https: www.baid v user login 想要获取v 的数据:v user login printurl url.rfind v : 想要获取 v 前的数据:https: www.baid printurl :url.rfind v ...
2019-06-03 18:07 0 6950 推荐指数:
原文链接:https://blog.csdn.net/caiyongshengCSDN/article/details/88420416 ...
js截取指定字符前面或后面的内容 原文链接:https://blog.csdn.net/caiyongshengCSDN/article/details/88420416 ...
JS字符串截取(获取指定字符后面的所有字符内容) function getCaption(obj){ var index=obj.lastIndexOf("\-"); obj=obj.substring ...
function getCaption(obj){ var index=obj.lastIndexOf("\-"); obj=obj.substring(inde ...
function getCaption(obj, text){ let index = obj.lastIndexOf(text) + text.length-1; obj ...
function getCaption(obj){ var index=obj.lastIndexOf("\-"); obj=obj.substring(index+1,obj.length ...
function getCaption(obj){ var index=obj.lastIndexOf("\-"); obj=obj.substring(index+1,obj.length); ...
= blueurl.match(reg2)[1]; 第一个正则获取最后一个/之前全部内容, ...