Wednesday, July 11, 2012

javascript – What is the point of the (?:x) character?



I\’m learning regex in JavaScript, and the (?:x) character or \”non-capturing parentheses\” just doesn\’t make sense to me. If you don\’t want the match to be remembered why not just abandon parentheses altogether? What\’s the advantage of using /(?:x)/ instead of just /x/?






Rating: 2 out of 5 based on 4 ratings


The post javascript – What is the point of the (?:x) character? appeared first on Javascript ASK.






via Javascript ASK http://javascriptask.phpfogapp.com/javascript-what-is-the-point-of-the-x-character.html

No comments:

Post a Comment