简体   繁体   中英

Regex for javascript include query to filename

There is jquery modal box called fancybox and its pretty cool i like it and intend to use it for my site, but the problem is that my flash video is actually video player and videos passed to it like query eg player.swf?videosource=video1.flv and this modal does not work it show contents of flash file as if you open in in text editor. Inside there's code

ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i,

I believe i need to modify this regex " /[^\\.]\\.(swf)\\s*$/i" expression to somehow include what i have after swf can someone help me do it i going crazy nothing i tried works.

此正则表达式应接受您的player.swf?videosource = video1.flv查询:

/[^\\.]\\.(swf)(?:\\?.+)?\\s*$/i

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM