我一直试图在一行中的两个字符串之间得到一个字符串。我发现了许多使用正则表达式的教程,但由于我对正则表达式不太好,我无法弄清楚如何做到这一点。任何帮助将不胜感激。
I have been trying to get a string between two strings in a line. I found a lots of tutorials using regex but as i am not that good at regex, i am not being able to figure out how to do it. Any help will be appreciated.
var fullUrl = "something/File/?URL=www.wireshock/&IP=0.0.0.0&CAT=BLOG&USER=MAND\\DEFAULT\\market4080";我需要找到一种方法来获取 http://之间的字符串。 com / File /?URL = 和& IP = ,然后返回 www.wireshock 。我不想把字符串从&分开得到中间的字符串,因为它破坏了一些网址与&其中的人物。任何帮助,将不胜感激。谢谢:)
i need to figure out a way to get the string between something/File/?URL= and &IP= and just return www.wireshock. I dont want to split the strings from "&" and get the middle string as it corrupts some urls with the & character in it. Any help would be appreciated. Thanks :)
推荐答案fullUrl.match(/URL=(.*?)&/i)[1];
更多推荐
在Javascript或jQuery中查找两个字符串之间的字符串
发布评论