开发者

regexkitlite match?

开发者 https://www.devze.com 2023-01-20 03:36 出处:网络
i would like to get everything inbetween &v= and \"> using a regex expression, NSString *YouTubeRegex =@\"/amp;v=([^(\\\">)]+)/\";

i would like to get everything inbetween &v= and "> using a regex expression,

NSString *YouTubeRegex =  @"/amp;v=([^(\">)]+)/";  

But that regex is not returning any matches ? i know the coding is correct just not the regex expression any he开发者_高级运维lp ?

Thanks


Try this :

/amp;v=(.+?)">/

http://www.rubular.com/r/Lqb63CsN2p


Assuming the regex engine is Perl-like:

"/&v=(.*)>/"

should do the trick.

0

精彩评论

暂无评论...
验证码 换一张
取 消