¡@

Home 

javascript Programming Glossary: alternation

Validate that a string is a positive integer

http://stackoverflow.com/questions/10834796/validate-that-a-string-is-a-positive-integer

regex negative look around with 2 adjacent matches

http://stackoverflow.com/questions/17340966/regex-negative-look-around-with-2-adjacent-matches

that would rather look like cat dog dog cat note that the alternation splits the entire pattern apart . But as I said lookbehinds.. just replace all dog s we find. We put the two cases in an alternation so they are both tried at every position in the string with..

Javascript regex hangs (using v8)

http://stackoverflow.com/questions/2407870/javascript-regex-hangs-using-v8

First it matches them all with the . on the left of the alternation. That fails because there's no closing tag so it tries matching.. in the inner bracket can't match both sides of the alternation will reduce the problem from an exponential one to one that.. length of the string. Use a character class instead of an alternation or put n on the right hand side of the alternation bar. n is..

How to escape HTML

http://stackoverflow.com/questions/3043775/how-to-escape-html

prepEntities str The regular expression below uses an alternation to look for a surrogate pair _or_ a single character that we.. might want to make an entity out of. The first part of the alternation the uD800 uDBFF uDC00 uDFFF before the you want to leave alone.. it searches for the surrogates. The second part of the alternation you can adjust as you see fit depending on how conservative..

Regular expression to validate US phone numbers? [duplicate]

http://stackoverflow.com/questions/9776231/regular-expression-to-validate-us-phone-numbers

both ^ 0 9 3 0 9 3 0 9 4 and ^ 0 9 3 0 9 3 0 9 4 is to use alternation ... ... specify them as two mostly separate options ^ 0 9 3..