when i trying this match im getting links like this;  Result:  "video","src":"https:\/\/video-mxp1-1.xx.fbcdn.net\/v\/t42.9040-2\/34384597_178997956146914_227512178675023872_n.mp4"  I want get just cleaned link like this:https:\/\/video-mxp1-1.xx.fbcdn.net\/v\/t42.9040-2\/34384597_178997956146914_227512178675023872_n.mp4  Thanks for your helps; My codes are below:  var VideoLinks='"type":"video","src":"https:\\\/\\\/video-mxp1-1.xx.fbcdn.net\\\/v\\\/t42.9040-2\\\/34333324_n.mp4?_nc_cat=0&amp;efg=ey1&amp;oe=5B211DB0","width":null"type":"video","src":"https:\\\/\\\/video-mxp1-1.xx.fbcdn.net\\\/v\\\/t42.9040-2\\\/34333324_n.mp4?_nc_cat=0&amp;efg=ey1&amp;oe=5B211DB0","width":null';  My Pattern pattern =/"video","src":"(.*?)"/g; var videos=Sitestring.match(pattern); console.log(videos);
8109
I want to match a portion of a string using a  and then access that parenthesized substring:  var myString = "something format_abc"; // I want "abc"  var arr = /(?:^|\s)format_(.*?)(?:\s|$)/.exec(myString);  console.log(arr);     // Prints: [" format_abc", "abc"] .. so far so good. console.log(arr[1]);  // Prints: undefined  (???) console.log(arr[0]);  // Prints: format_undefined (!!!)   What am I doing wrong?    I've discovered that there was nothing wrong with the regular expression code above: the actual string which I was testing against was this:  "date format_%A"   Reporting that "%A" is undefined seems a very strange behaviour, but it is not directly related to this question, so I've opened a new one, .    The issue was that console.log takes its parameters like a printf statement, and since the string I was logging ("%A") had a special value, it was trying to find the value of the next parameter.
23137
I was browsing the html of my favorite site...ahem...and I saw this in the markup:  &lt;link href="/Content/all.min.css?d=20090107" rel="stylesheet" type="text/css" /&gt;   what does "?d=20090107" do? I'm assuming it's a date of some kind, but I'm not sure why it's in the path to the file. Any ideas?
64488
I am trying to parse url-encoded strings that are made up of key=value pairs separated by either &amp; or &amp;amp;.   The following will only match the first occurrence, breaking apart the keys and values into separate result elements:  var result = mystring.match(/(?:&amp;|&amp;amp;)?([^=]+)=([^&amp;]+)/)   The results for the string '1111342=Adam%20Franco&amp;348572=Bob%20Jones' would be:  ['1111342', 'Adam%20Franco']   Using the global flag, 'g', will match all occurrences, but only return the fully matched sub-strings, not the separated keys and values:  var result = mystring.match(/(?:&amp;|&amp;amp;)?([^=]+)=([^&amp;]+)/g)   The results for the string '1111342=Adam%20Franco&amp;348572=Bob%20Jones' would be:  ['1111342=Adam%20Franco', '&amp;348572=Bob%20Jones']   While I could split the string on &amp; and break apart each key/value pair individually, is there any way using JavaScript's regular expression support to match multiple occurrences of the pattern /(?:&amp;|&amp;amp;)?([^=]+)=([^&amp;]+)/ similar to PHP's preg_match_all() function?  I'm aiming for some way to get results with the sub-matches separated like:  [['1111342', '348572'], ['Adam%20Franco', 'Bob%20Jones']]   or   [['1111342', 'Adam%20Franco'], ['348572', 'Bob%20Jones']]
76764
Is there any function that converts an escaped Url string to its unescaped form? System.Web.HttpUtility.UrlDecode() can do that job but I don't want to add a reference to System.Web.dll. Since my app is not a web application, I don't want to add a dependency for only using a function in an assembly.  UPDATE: Check  about the same issue.
95270
I am trying to Load test on the link:  and getting this error message:   Expected closing bracket for IPv6 address at index 28  Please could you help  Tuti
117888
This is basically an expanded version of part of  .  The original questioner there wants to redefine \href so that all the links end up in foonotes (rather than in the main document) so my suggestion was the old \let\oldcmd=\cmd \def\cmd{reimplement \cmd in some fancy way} trick.  Turned out that that didn't solve the problem.  But what broke this solution isn't really about the solution, it's about those @&amp;*@%y$#@ characters in URLs and ... *sigh* ... footnotes.  Not being an expert on hyperref, I appeal to the community to help.  (And half an hour gazing at the documentation and source of hyperref has not brought enlightenment either.)  I've tried the solutions at  and  to no avail (though perhaps I'm doing them wrong ... sorry, incorrectly).  Also, note that  is the wrong way around for this: the questioner wants the clickable link in the footnote.  Here's the URL that the questioner presented me with, embedded in a MWE:  \documentclass{article} \usepackage{hyperref}  \begin{document} Hello\footnote{\href{http://www.google.com/#sclient=psy&amp;hl=en&amp;site=&amp;source=hp&amp;q=numbers&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=&amp;pbx=1&amp;fp=d5033c56880e0199}{b}} world.  \end{document}   This produces the error:  ! Illegal parameter number in definition of \Hy@tempa. &lt;to be read again&gt;                     s l.9 ...qi=&amp;aql=&amp;oq=&amp;pbx=1&amp;fp=d5033c56880e0199}{b}}                                                    world.   which makes me think that it is the # that is causing the problem.
117651
Accorging to GNU documentation:  ‘\&lt;’ Match the empty string at the beginning of word. ‘\&gt;’ Match the empty string at the end of word.   My /etc/fstab looks like this:  /dev/sdb1       /media/fresh      ext2   defaults     0 0   I want grep to return TRUE/FALSE for the existence of /media/fresh. I tried to use \&lt; and \&gt; but it didn't work. Why?  egrep '\&lt;/media/fresh\&gt;' /etc/fstab   Workaround:  egrep '[[:blank:]]/media/fresh[[:blank:]]' /etc/fstab   But it looks uglier.  My grep is 2.5.1
79717
I'm trying to convert a series of JPEG images into a time lapse video. They're in the format IMGP0001.JPG, IMGP0002.JPG, etc. From the looks of things, this should match the pattern IMGP%04.JPG.  I've tried the following commands :  ffmpeg -f image2 -i IMGP%04d.jpg video.mpg   I get the error "IMGP%04d.JPG: No such file or directory".   What am I doing wrong? Perhaps the syntax "IMGP%04d.JPG" is *nix specific? If so what would be the Windows equivalent?
34906
I have this pattern:  1 11 21 1211 111221   I'm guessing it's a fibo pattern, been at it for hours now. Anyone know?
45470
I'm trying to make a URL with a tilde character (~) in it:  \usepackage{url} ... \url{http://lyle.smu.edu/~tspell/jaws}   It looks right in the resulting PDF, but when clicking on it the browser goes to a wrong URL: http://lyle.smu.edu/%18tspell/jaws  If I type in the browser %7e (escape code for '~') instead of %18 the browser then goes to the correct URL.  Any idea how to get a correct link in the PDF?
70098
I'm trying to get a regex that will match:  somefile_1.txt somefile_2.txt somefile_{anything}.txt   but not match:  somefile_16.txt   I tried  somefile_[^(16)].txt   with no luck (it includes even the "16" record)
20039
When I type site:example.com(using my domain obviously), I get several link errors showing up in the listing. Typically, they are of the form: /some/fixed/path/admin/unblockUser/11  I am thinking of adding the following line to my robots.txt file:  Disallow: /some/fixed/path/admin/*
83251
I did my search and found only  link, which is broken
115821
My  that I designed for him awhile has hundreds of SOFT 404's reported in  Google's Search Console formerly Webmaster Tools. Generally I find fixing soft 404 easy but this has me a little stumped. All the soft errors are returning a odd string that contains Q82019309.com with the occasional sub folder Aristocratwithin the string /?=.  The 404's generally look something like:   Encoded: /search/%E5%A4%A7%E5%A5%96%E6%80%BB%E4%BB%A3Q82019309.com  Decoded: /search/大奖总代Q82019309.com   The linked from information provides:   Encoded: /?s=%E5%A4%A7%E5%A5%96%E6%80%BB%E4%BB%A3Q82019309.com Decoded: /?s=大奖总代Q82019309.com   At first I believed this was an isolated issue but upon investigating I discovered that this issue actually affects thousands of websites and someone must know the cause. When I Google  or  I'm overwhelmed with the amount of results, including some of highly reputable sites such as:        Question(s):  So what is causing these soft 404 errors with string Q82019309.com with or without Aristocrat.
52153
I have a script that parses the filenames of TV episodes (show.name.s01e02.avi for example), grabs the episode name (from the www.thetvdb.com API) and automatically renames them into something nicer (Show Name - [01x02].avi)  The script works fine, that is until you try and use it on files that have Unicode show-names (something I never really thought about, since all the files I have are English, so mostly pretty-much all fall within [a-zA-Z0-9'\-])  How can I allow the regular expressions to match accented characters and the likes? Currently the regex's config section looks like..  config['valid_filename_chars'] = """0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@£$%^&amp;*()_+=-[]{}"'.,&lt;&gt;`~? """ config['valid_filename_chars_regex'] = re.escape(config['valid_filename_chars'])  config['name_parse'] = [     # foo_[s01]_[e01]     re.compile('''^([%s]+?)[ \._\-]\[[Ss]([0-9]+?)\]_\[[Ee]([0-9]+?)\]?[^\\/]*$'''% (config['valid_filename_chars_regex'])),     # foo.1x09*     re.compile('''^([%s]+?)[ \._\-]\[?([0-9]+)x([0-9]+)[^\\/]*$''' % (config['valid_filename_chars_regex'])),     # foo.s01.e01, foo.s01_e01     re.compile('''^([%s]+?)[ \._\-][Ss]([0-9]+)[\.\- ]?[Ee]([0-9]+)[^\\/]*$''' % (config['valid_filename_chars_regex'])),     # foo.103*     re.compile('''^([%s]+)[ \._\-]([0-9]{1})([0-9]{2})[\._ -][^\\/]*$''' % (config['valid_filename_chars_regex'])),     # foo.0103*     re.compile('''^([%s]+)[ \._\-]([0-9]{2})([0-9]{2,3})[\._ -][^\\/]*$''' % (config['valid_filename_chars_regex'])), ]
97967
So, I'm using a script I've made to convert videos to the webm format. A certain program calls the script, sending %f which is the full, absolute file name of the video, like this:  converter.sh %f   where %f has two possible extensions, .avi or .mpg.  # /bin/bash ffmpeg -i $1 `dirname $1``basename $1 avi`webm &amp;&amp; rm $1   It currently works perfectly when $1 contains a .avi file, because basename removes the .avi extension. When $1 ends with .mpg instead, the result is .mpgwebm.  How can I modify that script to be able to receive those two possible different formats?    Resuming: If $1 is /somedir/video.avi, the script should do:  ffmpeg -i /somedir/video.avi /somedir/video.webm   And if $1 is /somedir/video.mpg, the script should do:  ffmpeg -i /somedir/video.mpg /somedir/video.webm   I know this might be fool for some people, but I'm kind of new with the bash.
117758
When I type a URL in angle brackets, such as &lt;;, in a comment, the URL is not detected and linked.  Supporting this would allow links to be used more naturally in the flow of text in a comment.  This notation is recommended for embedding URLs in running text by ; quotes are also recommended (I do not know if quotes work or not).