javascript Programming Glossary: regex.exec
How can I determine a timezone by the UTC offset? http://stackoverflow.com/questions/1274743/how-can-i-determine-a-timezone-by-the-utc-offset new RegExp ^ d 4 d 2 d 2 T d 2 d 2 d 2 d 2 d 2 var matches regex.exec timestamp if matches null var offset parseInt matches 8 10 60..
Resizing an iframe based on content http://stackoverflow.com/questions/153152/resizing-an-iframe-based-on-content regexS name ^ # var regex new RegExp regexS var results regex.exec window.location.href if results null return else return results..
Determine whether element has fixed or percentage width using JavaScript http://stackoverflow.com/questions/1782566/determine-whether-element-has-fixed-or-percentage-width-using-javascript var regex new RegExp . . . g var p property if .test p p regex.exec property p p 1 p 2 .toUpperCase p 3 if se.get 0 .style p undefined..
Firefox bad RegEx performance http://stackoverflow.com/questions/19680266/firefox-bad-regex-performance takes start window.performance.now for var j 0 j 10000 j regex.exec str durations.push window.performance.now start Create output..
Is there a version of JavaScript's String.indexOf() that allows for regular expressions? http://stackoverflow.com/questions/273789/is-there-a-version-of-javascripts-string-indexof-that-allows-for-regular-expr 0 startpos 1 var lastIndexOf 1 var nextStop 0 while result regex.exec stringToWorkWith null lastIndexOf result.index regex.lastIndex..
How to find all occurrences of one string in another in JavaScript? http://stackoverflow.com/questions/3410464/how-to-find-all-occurrences-of-one-string-in-another-in-javascript in Lebanon. var regex le gi result indices while result regex.exec str indices.push result.index UPDATE I failed to spot in the..
dom wrapping a substring in textnode with a new span node http://stackoverflow.com/questions/4040495/dom-wrapping-a-substring-in-textnode-with-a-new-span-node matchLength matchedText while textNode result regex.exec textNode.data matchedTextNode textNode.splitText result.index..
How do I get query string value from script path? http://stackoverflow.com/questions/4716612/how-do-i-get-query-string-value-from-script-path key.replace .replace var regex new RegExp key ^ # var qs regex.exec window.location.href if qs null return defaultValue else return..
Javascript/RegExp: Lookbehind Assertion is causing a “Invalid group” error http://stackoverflow.com/questions/5973669/javascript-regexp-lookbehind-assertion-is-causing-a-invalid-group-error
How can I get query string values in JavaScript? http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript .replace var regex new RegExp name ^ # results regex.exec location.search return results null decodeURIComponent results..
|